Add prompt to refresh.sh
This commit is contained in:
parent
9e119c1c4f
commit
28719a71da
@ -564,9 +564,16 @@ refresh.sh
|
|||||||
two configuration files is often not useful. But tools/cmpconfig
|
two configuration files is often not useful. But tools/cmpconfig
|
||||||
will show only the meaningful differences between the two
|
will show only the meaningful differences between the two
|
||||||
configuration files.
|
configuration files.
|
||||||
|
4. It will edit the .config file to comment out the setting
|
||||||
|
of the CONFIG_APPS_DIR= setting. This setting should not
|
||||||
|
be in checked-in defconfig files because the actually must
|
||||||
|
be determined at the next time that the configuration is
|
||||||
|
installed.
|
||||||
5. Finally, the refreshed defconfig file is copied back in
|
5. Finally, the refreshed defconfig file is copied back in
|
||||||
place where it can be committed with the next set of
|
place where it can be committed with the next set of
|
||||||
difference (unless you add --dry-run) to the command line.
|
difference to the command line. refresh.sh will prompt
|
||||||
|
you first to avoid overwriting the defconfig file with
|
||||||
|
changes that you do not want.
|
||||||
`
|
`
|
||||||
zipme.sh
|
zipme.sh
|
||||||
--------
|
--------
|
||||||
|
@ -32,17 +32,13 @@
|
|||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
USAGE="USAGE: $0 [--dry-run|--debug|--help] <board>/<config>"
|
USAGE="USAGE: $0 [--debug|--help] <board>/<config>"
|
||||||
ADVICE="Try '$0 --help' for more information"
|
ADVICE="Try '$0 --help' for more information"
|
||||||
|
|
||||||
unset CONFIG
|
unset CONFIG
|
||||||
DRYRUN=n
|
|
||||||
|
|
||||||
while [ ! -z "$1" ]; do
|
while [ ! -z "$1" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--dry-run )
|
|
||||||
DRYRUN=y
|
|
||||||
;;
|
|
||||||
--debug )
|
--debug )
|
||||||
set -x
|
set -x
|
||||||
;;
|
;;
|
||||||
@ -52,8 +48,6 @@ while [ ! -z "$1" ]; do
|
|||||||
echo $USAGE
|
echo $USAGE
|
||||||
echo ""
|
echo ""
|
||||||
echo "Where:"
|
echo "Where:"
|
||||||
echo " --dry-run"
|
|
||||||
echo " Do no change the defconfig file"
|
|
||||||
echo " --debug"
|
echo " --debug"
|
||||||
echo " Enable script debug"
|
echo " Enable script debug"
|
||||||
echo " --help"
|
echo " --help"
|
||||||
@ -169,16 +163,23 @@ make oldconfig
|
|||||||
|
|
||||||
# Show differences
|
# Show differences
|
||||||
|
|
||||||
|
sed -i -e "s/^CONFIG_APPS_DIR/# CONFIG_APPS_DIR/g" .config
|
||||||
$CMPCONFIG $DEFCONFIG .config
|
$CMPCONFIG $DEFCONFIG .config
|
||||||
|
|
||||||
if [ "X$DRYRUN" = "Xn" ]; then
|
# Save the refreshed configuration
|
||||||
|
|
||||||
|
read -p "Save the new configuration (y/n)?" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
echo "Saving the new configuration file"
|
echo "Saving the new configuration file"
|
||||||
sed -i -e "s/^CONFIG_APPS_DIR/# CONFIG_APPS_DIR/g" .config
|
|
||||||
mv .config $DEFCONFIG || \
|
mv .config $DEFCONFIG || \
|
||||||
{ echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; }
|
{ echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; }
|
||||||
chmod 644 $DEFCONFIG
|
chmod 644 $DEFCONFIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Restore any previous .config file
|
||||||
|
|
||||||
if [ -e SAVEconfig ]; then
|
if [ -e SAVEconfig ]; then
|
||||||
mv SAVEconfig .config || \
|
mv SAVEconfig .config || \
|
||||||
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
||||||
|
Loading…
Reference in New Issue
Block a user