index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2024-08-16 08:06:08 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2024-08-16 08:06:08 +0200 |
commit | deffc1b87e86fffa8e4758a76a1912c6c8f69a85 (patch) | |
tree | 0f61a152c4c49d40de5042df2b25cdb8e0b0a82d /src/lib/common.sh | |
parent | 2994bca96781afd62104c1515532a9c479cb5bed (diff) | |
parent | 27eebe383d0b571c08cba991e4824768d7623602 (diff) |
-rw-r--r-- | src/lib/common.sh | 24 |
diff --git a/src/lib/common.sh b/src/lib/common.sh index 00ece97..5416eaf 100644 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -15,6 +15,9 @@ $DEVTOOLS_INCLUDE_COMMON_SH # Avoid any encoding problems export LANG=C.UTF-8 +# Avoid systemd trying to color the terminal on systemd-nspawn +export SYSTEMD_TINT_BACKGROUND=no + # Set buildtool properties export BUILDTOOL=devtools export BUILDTOOLVER=@buildtoolver@ @@ -31,6 +34,17 @@ export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer export AUR_URL_SSH=aur@aur.archlinux.org +export RSYNC_OPTS=( + --rsh=ssh + --checksum + --copy-links + --human-readable + --progress + --partial + --partial-dir=.partial + --delay-updates +) + # ensure TERM is set with a fallback to dumb export TERM=${TERM:-dumb} @@ -106,6 +120,8 @@ print_workdir_error() { } _setup_workdir=false +# Ensure that there is no outside value for WORKDIR leaking in +unset WORKDIR setup_workdir() { [[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX") _setup_workdir=true @@ -343,6 +359,14 @@ is_debug_package() { [[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = "${pkgname}" ]] } +# Proxy function to check if a file exists. Using [[ -f ... ]] directly is not +# always wanted because we might want to expand bash globs first. This way we +# can pass unquoted globs to is_globfile() and have them expanded as function +# arguments before being checked. +is_globfile() { + [[ -f $1 ]] +} + join_by() { local IFS="$1" shift |