summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Bobroff <sam.bobroff@au1.ibm.com>2015-07-20 15:12:19 +1000
committerMichal Marek <mmarek@suse.com>2015-08-20 13:56:55 +0200
commit78a6854e219ba266b6cc12f840b571c5f1168b5e (patch)
tree4dc5da40c001046239683073a0a2e086532a1e06 /scripts
parent09cd75555cd9051bdeac7a29c6ff12d6b9e8341b (diff)
downloadlinux-78a6854e219ba266b6cc12f840b571c5f1168b5e.tar.bz2
merge_config.sh: exit on missing input files
Add a check for the existence of input files and exit (with failure) if they are missing. Without this additional check, missing files produce error messages but still result in an output file being generated and a successful exit code. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kconfig/merge_config.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index ec8e20350a64..0d883b37882a 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -100,6 +100,10 @@ cat $INITFILE > $TMP_FILE
# Merge files, printing warnings on overridden values
for MERGE_FILE in $MERGE_LIST ; do
echo "Merging $MERGE_FILE"
+ if [ ! -r "$MERGE_FILE" ]; then
+ echo "The merge file '$MERGE_FILE' does not exist. Exit." >&2
+ exit 1
+ fi
CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
for CFG in $CFG_LIST ; do