From 15454b181e1d488bd5d22723e14e87144b94de14 Mon Sep 17 00:00:00 2001 From: xonix Date: Fri, 12 Feb 2021 16:01:20 +0200 Subject: [PATCH] Find a way to develop code in separate makesure.awk file #7 --- Makesurefile | 1 + makesure | 4 +--- tests/0_basic.tush | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makesurefile b/Makesurefile index 5eda1ae..8dc10ac 100644 --- a/Makesurefile +++ b/Makesurefile @@ -49,6 +49,7 @@ before_count=$(ls -1 /tmp/makesure.* | wc -l) export PATH="$PATH:$MYDIR/soft/tush/bin" + export NEXT_VERSION="NEXT_VERSION" for f in tests/*.tush do diff --git a/makesure b/makesure index 22206dc..4ac1244 100755 --- a/makesure +++ b/makesure @@ -1,10 +1,8 @@ #!/usr/bin/env sh -VERSION="0.9.6.1" - mydir=$( cd "$(dirname "$0")" pwd ) -exec awk -v "Version=$VERSION" -f "$mydir/makesure.awk" Makesurefile "$@" \ No newline at end of file +exec awk -v "Version=$NEXT_VERSION" -f "$mydir/makesure.awk" Makesurefile "$@" \ No newline at end of file diff --git a/tests/0_basic.tush b/tests/0_basic.tush index a82d899..0b49b88 100644 --- a/tests/0_basic.tush +++ b/tests/0_basic.tush @@ -1,13 +1,13 @@ $ cd "$MYDIR"; ./makesure -v; ./makesure --version -| 0.9.6.1 -| 0.9.6.1 +| NEXT_VERSION +| NEXT_VERSION $ cd "$MYDIR/tests/emptydir"; ../../makesure -v -| 0.9.6.1 +| NEXT_VERSION $ cd "$MYDIR/tests/emptydir"; ../../makesure -h -| makesure ver. 0.9.6.1 +| makesure ver. NEXT_VERSION | Usage: makesure [options...] [-f buildfile] [goals...] | -f,--file buildfile | set buildfile to use (default Makesurefile)