Quick preflight check for bootstrap

This commit is contained in:
deajan 2017-06-20 15:20:42 +02:00
parent 1375ab425b
commit a80b65860a
1 changed files with 14 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
## dev pre-processor bootstrap rev 2017061901 ## dev pre-processor bootstrap rev 2017062001
## Yeah !!! A really tech sounding name... In fact it's just include emulation in bash ## Yeah !!! A really tech sounding name... In fact it's just include emulation in bash
function Usage { function Usage {
@ -35,16 +35,22 @@ done
if [ "$bootstrapProgram" == "" ]; then if [ "$bootstrapProgram" == "" ]; then
Usage Usage
exit 128 exit 128
fi else
source "merge.sh" source "merge.sh"
__PREPROCESSOR_PROGRAM=$bootstrapProgram __PREPROCESSOR_PROGRAM=$bootstrapProgram
__PREPROCESSOR_PROGRAM_EXEC="n_$bootstrapProgram.sh"
__PREPROCESSOR_Constants __PREPROCESSOR_Constants
cp "n_$__PREPROCESSOR_PROGRAM.sh" "$outputFileName.tmp.sh" if [ ! -f "$__PREPROCESSOR_PROGRAM_EXEC" ]; then
echo "Cannot find file [n_$bootstrapProgram.sh]."
exit 1
fi
fi
cp "$__PREPROCESSOR_PROGRAM_EXEC" "$outputFileName.tmp.sh"
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Cannot copy original file [n_$__PREPROCESSOR_PROGRAM.sh] to [$outputFileName.tmp.sh]." echo "Cannot copy original file [$__PREPROCESSOR_PROGRAM_EXEC] to [$outputFileName.tmp.sh]."
exit 1 exit 1
fi fi
for subset in "${__PREPROCESSOR_SUBSETS[@]}"; do for subset in "${__PREPROCESSOR_SUBSETS[@]}"; do