mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
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.
This commit is contained in:
parent
59ed39ec46
commit
200f389ed0
4 changed files with 15 additions and 11 deletions
8
Makefile
8
Makefile
|
|
@ -347,12 +347,12 @@ deb: dist config.sh
|
||||||
./mkdeb.sh
|
./mkdeb.sh
|
||||||
|
|
||||||
.PHONY: test-compile
|
.PHONY: test-compile
|
||||||
test-compile: dist config.mk
|
test-compile: dist config.sh
|
||||||
cd test/compile; ./compile.sh $(TARNAME)-$(VERSION)
|
cd test/compile; ./compile.sh
|
||||||
|
|
||||||
.PHONY: rpms
|
.PHONY: rpms
|
||||||
rpms: src/man config.mk
|
rpms: src/man config.sh
|
||||||
./platform/rpm/mkrpm.sh $(TARNAME) $(VERSION)
|
./platform/rpm/mkrpm.sh
|
||||||
|
|
||||||
.PHONY: extras
|
.PHONY: extras
|
||||||
extras: all
|
extras: all
|
||||||
|
|
|
||||||
2
mkasc.sh
2
mkasc.sh
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (C) 2014-2023 Firejail Authors
|
# Copyright (C) 2014-2023 Firejail Authors
|
||||||
# License GPL v2
|
# 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"
|
printf 'Calculating SHA256 for all files in /transfer - %s version %s' "$TARNAME" "$VERSION"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,18 @@
|
||||||
# Copyright (C) 2014-2023 Firejail Authors
|
# Copyright (C) 2014-2023 Firejail Authors
|
||||||
# License GPL v2
|
# License GPL v2
|
||||||
#
|
#
|
||||||
# Usage: ./platform/rpm/mkrpm.sh firejail <version> "<config options>"
|
# Usage: ./platform/rpm/mkrpm.sh <config options>
|
||||||
#
|
#
|
||||||
# Builds rpms in a temporary directory then places the result in the
|
# Builds rpms in a temporary directory then places the result in the
|
||||||
# current working directory.
|
# 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
|
# Strip any trailing prefix from the version like -rc1 etc
|
||||||
version="$(printf '%s\n' "$2" | sed 's/\-.*//g')"
|
version="$(printf '%s\n' "$VERSION" | sed 's/\-.*//g')"
|
||||||
config_opt="$3"
|
config_opt="$*"
|
||||||
|
|
||||||
if [[ ! -f "platform/rpm/${name}.spec" ]]; then
|
if [[ ! -f "platform/rpm/${name}.spec" ]]; then
|
||||||
printf 'error: spec file not found for name %s\n' "${name}" >&2
|
printf 'error: spec file not found for name %s\n' "${name}" >&2
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
# install contrib scripts
|
# install contrib scripts
|
||||||
# --enable-analyzer enable GCC 10 static analyzer
|
# --enable-analyzer enable GCC 10 static analyzer
|
||||||
|
|
||||||
|
# shellcheck source=config.sh
|
||||||
|
. "$(dirname "$0")/../../config.sh" || exit 1
|
||||||
|
|
||||||
arr[1]="TEST 1: standard compilation"
|
arr[1]="TEST 1: standard compilation"
|
||||||
arr[2]="TEST 2: compile dbus proxy disabled"
|
arr[2]="TEST 2: compile dbus proxy disabled"
|
||||||
|
|
@ -51,7 +52,7 @@ print_title() {
|
||||||
echo "**************************************************"
|
echo "**************************************************"
|
||||||
}
|
}
|
||||||
|
|
||||||
DIST="$1"
|
DIST="$(TARNAME)-$(VERSION)"
|
||||||
while [[ $# -gt 0 ]]; do # Until you run out of parameters . . .
|
while [[ $# -gt 0 ]]; do # Until you run out of parameters . . .
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--clean)
|
--clean)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue