From 6b66d4cad8a3258f0548de549aa0255f710cd8b1 Mon Sep 17 00:00:00 2001 From: xonix Date: Fri, 22 Sep 2023 01:51:07 +0300 Subject: [PATCH] Update to comply with revamp_define development --- Makesurefile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Makesurefile b/Makesurefile index 5a545d9..becff08 100644 --- a/Makesurefile +++ b/Makesurefile @@ -1,9 +1,9 @@ # vim: syntax=bash @options timing -@define TUSH_REPO='https://github.com/adolfopa/tush' -@define GOAWK_VERSION='1.24.0' -@define GOAWK="goawk$GOAWK_VERSION" +@define TUSH_REPO 'https://github.com/adolfopa/tush' +@define GOAWK_VERSION '1.24.0' +@define GOAWK "./soft/goawk$GOAWK_VERSION" @goal soft_folder_created @private @reached_if [[ -d "soft" ]] @@ -65,10 +65,12 @@ @depends_on tested_by @args 'tush' './soft/busybox awk -f ./fhtagn.awk' @depends_on tested_by @args 'fhtagn' './soft/busybox awk -f ./fhtagn.awk' +@define _GOAWK_FHTAGN_CMD "$GOAWK -f ./fhtagn.awk" + @goal tested_by_goawk @depends_on installed_goawk -@depends_on tested_by @args 'tush' './soft/goawk1.24.0 -f ./fhtagn.awk' -@depends_on tested_by @args 'fhtagn' './soft/goawk1.24.0 -f ./fhtagn.awk' +@depends_on tested_by @args 'tush' _GOAWK_FHTAGN_CMD +@depends_on tested_by @args 'fhtagn' _GOAWK_FHTAGN_CMD @goal tested_by @params TOOL FHTAGN @depends_on tush_installed @@ -148,7 +150,7 @@ echo "Installed: $(./soft/busybox | head -n 1)" @goal installed_goawk @private -@reached_if [[ -f soft/$GOAWK ]] +@reached_if [[ -f $GOAWK ]] @depends_on soft_folder_created echo echo "Fetching GoAWK $GOAWK_VERSION ..." @@ -170,8 +172,8 @@ tar xzvf "$F" goawk rm "$F" - mv goawk $GOAWK - "./$GOAWK" --version + mv goawk "goawk$GOAWK_VERSION" + "./goawk$GOAWK_VERSION" --version @goal update_readme @doc 'updates the README.md with the current output of the tool' @@ -186,14 +188,16 @@ mv README.md.1 README.md -@define COVERPROFILE="/tmp/cov_fhtagn.txt" +@define COVERPROFILE "/tmp/cov_fhtagn.txt" @goal _cover_profile_deleted @private rm -f "$COVERPROFILE" +@define _GOAWK_COVER "$GOAWK -covermode=set -coverprofile=$COVERPROFILE -coverappend -f ./fhtagn.awk" + @goal _cover_profile_prepared @private @depends_on _cover_profile_deleted -@depends_on tested_by @args 'fhtagn' './soft/goawk1.24.0 -covermode=set -coverprofile=/tmp/cov_fhtagn.txt -coverappend -f ./fhtagn.awk' +@depends_on tested_by @args 'fhtagn' _GOAWK_COVER @goal coverage @doc 'prepares code coverage report'