diff options
Diffstat (limited to 'platform')
-rwxr-xr-x | platform/rpm/mkrpm.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh index de26ca8d1..0572480c6 100755 --- a/platform/rpm/mkrpm.sh +++ b/platform/rpm/mkrpm.sh | |||
@@ -3,15 +3,18 @@ | |||
3 | # Copyright (C) 2014-2023 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | # | 5 | # |
6 | # Usage: ./platform/rpm/mkrpm.sh firejail <version> "<config options>" | 6 | # Usage: ./platform/rpm/mkrpm.sh <config options> |
7 | # | 7 | # |
8 | # Builds rpms in a temporary directory then places the result in the | 8 | # Builds rpms in a temporary directory then places the result in the |
9 | # current working directory. | 9 | # current working directory. |
10 | 10 | ||
11 | name="$1" | 11 | # shellcheck source=config.sh |
12 | . "$(dirname "$0")/../../config.sh" || exit 1 | ||
13 | |||
14 | name="$TARNAME" | ||
12 | # Strip any trailing prefix from the version like -rc1 etc | 15 | # Strip any trailing prefix from the version like -rc1 etc |
13 | version="$(printf '%s\n' "$2" | sed 's/\-.*//g')" | 16 | version="$(printf '%s\n' "$VERSION" | sed 's/\-.*//g')" |
14 | config_opt="$3" | 17 | config_opt="$*" |
15 | 18 | ||
16 | if [[ ! -f "platform/rpm/${name}.spec" ]]; then | 19 | if [[ ! -f "platform/rpm/${name}.spec" ]]; then |
17 | printf 'error: spec file not found for name %s\n' "${name}" >&2 | 20 | printf 'error: spec file not found for name %s\n' "${name}" >&2 |