mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-08-12 03:39:54 +00:00
This commit introduces small shell wrapper, which calls archbuild mimicing symlinked command. It allows to distribute static sudoers file. Additionally build_command option has been renamed to devtools_wrapper in order to allow to keep backward compatibility
34 lines
768 B
Bash
Executable File
34 lines
768 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
usage() {
|
|
local cmd="${0##*/}"
|
|
echo "Usage: $cmd [options] -- [archbuild args]"
|
|
echo " -r <repository> Repository name"
|
|
echo " -a <architecture> Repository architecture"
|
|
exit 1
|
|
}
|
|
|
|
repository=
|
|
architecture=
|
|
|
|
while getopts ":r:a:" arg; do
|
|
case "$arg" in
|
|
r) repository="$OPTARG" ;;
|
|
a) architecture="$OPTARG" ;;
|
|
*) usage ;;
|
|
esac
|
|
done
|
|
|
|
if [[ -z $repository || -z $architecture ]]; then
|
|
usage
|
|
fi
|
|
|
|
source "/usr/share/devtools/lib/archroot.sh"
|
|
check_root "SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,NPROC,MAKEFLAGS,PACKAGER,GNUPGHOME" "${BASH_SOURCE[0]}" "$@"
|
|
|
|
exec bash -c '
|
|
source "$1" "${@:2}"
|
|
' "${repository}-${architecture}-build" "archbuild" "${@:$OPTIND}"
|