From 5bcc7c75eab6d085176e6e2004a30bfa52b7fda4 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 18 Jun 2017 22:48:38 +0200 Subject: [PATCH] Permit bootstrap of other executables --- dev/bootstrap.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dev/bootstrap.sh b/dev/bootstrap.sh index 027122d..a953f30 100755 --- a/dev/bootstrap.sh +++ b/dev/bootstrap.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -## dev pre-processor bootstrap rev 2016121302 +## dev pre-processor bootstrap rev 2017061801 ## Yeah !!! A really tech sounding name... In fact it's just include emulation in bash if [ ! -f "./merge.sh" ]; then @@ -9,9 +9,15 @@ if [ ! -f "./merge.sh" ]; then fi outputFileName="$0" +if [ "$1" == "" ]; then + PRG=osync +else + PRG="$1" +fi source "merge.sh" -__PREPROCESSOR_PROGRAM=osync + +__PREPROCESSOR_PROGRAM=$PRG __PREPROCESSOR_Constants cp "n_$__PREPROCESSOR_PROGRAM.sh" "$outputFileName.tmp.sh" @@ -22,9 +28,9 @@ 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" +chmod +x "$outputFileName.tmp.sh" if [ $? != 0 ]; then - echo "Cannot make [$outputFileName] executable.." + echo "Cannot make [$outputFileName] executable." exit 1 fi