diff --git a/Makefile b/Makefile index 03ae710268b..3055e226a16 100644 --- a/Makefile +++ b/Makefile @@ -347,12 +347,12 @@ deb: dist config.sh ./mkdeb.sh .PHONY: test-compile -test-compile: dist config.mk - cd test/compile; ./compile.sh $(TARNAME)-$(VERSION) +test-compile: dist config.sh + cd test/compile; ./compile.sh .PHONY: rpms -rpms: src/man config.mk - ./platform/rpm/mkrpm.sh $(TARNAME) $(VERSION) +rpms: src/man config.sh + ./platform/rpm/mkrpm.sh .PHONY: extras extras: all diff --git a/mkasc.sh b/mkasc.sh index 62c1b1180a2..0314c20e560 100755 --- a/mkasc.sh +++ b/mkasc.sh @@ -3,7 +3,7 @@ # Copyright (C) 2014-2023 Firejail Authors # License GPL v2 -. "$(dirname "$0")/config.sh" +. "$(dirname "$0")/config.sh" || exit 1 printf 'Calculating SHA256 for all files in /transfer - %s version %s' "$TARNAME" "$VERSION" diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh index de26ca8d118..0572480c655 100755 --- a/platform/rpm/mkrpm.sh +++ b/platform/rpm/mkrpm.sh @@ -3,15 +3,18 @@ # Copyright (C) 2014-2023 Firejail Authors # License GPL v2 # -# Usage: ./platform/rpm/mkrpm.sh firejail "" +# Usage: ./platform/rpm/mkrpm.sh # # Builds rpms in a temporary directory then places the result in the # current working directory. -name="$1" +# shellcheck source=config.sh +. "$(dirname "$0")/../../config.sh" || exit 1 + +name="$TARNAME" # Strip any trailing prefix from the version like -rc1 etc -version="$(printf '%s\n' "$2" | sed 's/\-.*//g')" -config_opt="$3" +version="$(printf '%s\n' "$VERSION" | sed 's/\-.*//g')" +config_opt="$*" if [[ ! -f "platform/rpm/${name}.spec" ]]; then printf 'error: spec file not found for name %s\n' "${name}" >&2 diff --git a/test/compile/compile.sh b/test/compile/compile.sh index 06b4646a823..0e3425f8d0c 100755 --- a/test/compile/compile.sh +++ b/test/compile/compile.sh @@ -11,7 +11,8 @@ # install contrib scripts # --enable-analyzer enable GCC 10 static analyzer - +# shellcheck source=config.sh +. "$(dirname "$0")/../../config.sh" || exit 1 arr[1]="TEST 1: standard compilation" arr[2]="TEST 2: compile dbus proxy disabled" @@ -51,7 +52,7 @@ print_title() { echo "**************************************************" } -DIST="$1" +DIST="$(TARNAME)-$(VERSION)" while [[ $# -gt 0 ]]; do # Until you run out of parameters . . . case "$1" in --clean)