aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-28 13:05:54 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-07-28 14:10:31 -0300
commit200f389ed0f56ba42160fe135e3701757a8df94c (patch)
tree644ebe2eccff1991e11ff1f6391df0f60e9978f1 /platform
parentbuild: fix shellcheck issues in mkrpm.sh/compile.sh (diff)
downloadfirejail-200f389ed0f56ba42160fe135e3701757a8df94c.tar.gz
firejail-200f389ed0f56ba42160fe135e3701757a8df94c.tar.zst
firejail-200f389ed0f56ba42160fe135e3701757a8df94c.zip
build: use config.sh in more scripts
This removes the need to manually pass variables such as `$(TARNAME)` and `$(VERSION)` to shell scripts in the root Makefile. Relates to #5140.
Diffstat (limited to 'platform')
-rwxr-xr-xplatform/rpm/mkrpm.sh11
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
11name="$1" 11# shellcheck source=config.sh
12. "$(dirname "$0")/../../config.sh" || exit 1
13
14name="$TARNAME"
12# Strip any trailing prefix from the version like -rc1 etc 15# Strip any trailing prefix from the version like -rc1 etc
13version="$(printf '%s\n' "$2" | sed 's/\-.*//g')" 16version="$(printf '%s\n' "$VERSION" | sed 's/\-.*//g')"
14config_opt="$3" 17config_opt="$*"
15 18
16if [[ ! -f "platform/rpm/${name}.spec" ]]; then 19if [[ ! -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