You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
osync/dev/bootstrap.sh

28 lines
766 B
Bash

#!/usr/bin/env bash
## dev pre-processor bootstrap rev 2016120701
## Yeah !!! A really tech sounding name... In fact it's just include emulation in bash
outputFileName="$0"
source "merge.sh"
__PREPROCESSOR_PROGRAM=osync
__PREPROCESSOR_Constants
cp "n_$__PREPROCESSOR_PROGRAM.sh" "$outputFileName.tmp.sh"
if [ $? != 0 ]; then
QuickLogger "Cannot copy original file [n_$__PREPROCESSOR_PROGRAM.sh] to [$outputFileName.tmp.sh]." "stderr"
exit 1
fi
for subset in "${__PREPROCESSOR_SUBSETS[@]}"; do
__PREPROCESSOR_MergeSubset "$subset" "${subset//SUBSET/SUBSET END}" "ofunctions.sh" "$outputFileName.tmp.sh"
done
chmod +x "$0.tmp.sh"
if [ $? != 0 ]; then
QuickLogger "Cannot make [$outputFileName] executable.." "stderr"
exit 1
fi
"$outputFileName.tmp.sh" "$@"