summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/abslibre-tools/libredbdiff4
-rwxr-xr-xsrc/abslibre-tools/librerelease10
-rw-r--r--src/chroot-tools/chcleanup.in2
-rwxr-xr-xsrc/chroot-tools/distcc-tool14
-rwxr-xr-xsrc/chroot-tools/librechroot2
-rwxr-xr-xsrc/chroot-tools/libremakepkg2
6 files changed, 16 insertions, 18 deletions
diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff
index 487b88f..293c144 100755
--- a/src/abslibre-tools/libredbdiff
+++ b/src/abslibre-tools/libredbdiff
@@ -2,7 +2,7 @@
# libredbdiff
#
# Copyright (C) 2014 Esteban Carnevale <alfplayer@mailoo.org>
-# Copyright (C) 2014, 2017 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -319,7 +319,7 @@ main_compare() {
local tmpdir
tmpdir="$(mktemp --tmpdir -d "$cmd.XXXXXXXXXX")" || die "Could not create temporary working directory"
- trap "rm -rf -- $(printf %q "$tmpdir")" RETURN
+ trap "rm -rf -- ${tmpdir@Q}" RETURN
local arch_packages_tmp="$tmpdir/arch-packages"
local prbl_packages_tmp="$tmpdir/parabola-packages"
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 705efc5..3a987b2 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -5,7 +5,7 @@
# Copyright (C) 2010-2012 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
# Copyright (C) 2010-2013 Nicolás Reynolds <fauno@parabola.nu>
# Copyright (C) 2013 Michał Masłowski <mtjm@mtjm.eu>
-# Copyright (C) 2013-2014, 2017 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
#
# For just the create_signature() function:
# Copyright (C) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
@@ -232,7 +232,7 @@ clean() {
local file_list
file_list="$(mktemp -t "${0##*/}.XXXXXXXXXX")"
- trap "$(printf 'rm -f -- %q' "$file_list")" EXIT
+ trap "rm -f -- ${file_list@Q}" EXIT
list0_files > "$file_list"
lock_close 8
@@ -259,14 +259,14 @@ release_packages() {
find "${WORKDIR}/staging" -type d -exec chmod 755 {} +
local file_list="$(mktemp -t ${0##*/}.XXXXXXXXXX)"
- trap "$(printf 'rm -f -- %q' "$file_list")" EXIT
+ trap "rm -f -- ${file_list@Q}" EXIT
list0_files > "$file_list"
lock_close 8
msg "%s to upload" "$(cd "${WORKDIR}/staging" && du -hc --files0-from="$file_list" | sed -n '$s/\t.*//p')"
msg "Uploading packages..."
- xargs -0r -a "$file_list" dirname -z | ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "$(printf 'mkdir -p -- %q && cd %q && xargs -0r mkdir -pv --' "${REPODEST_path}"{,})"
+ xargs -0r -a "$file_list" dirname -z | ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "mkdir -p -- ${REPODEST_path@Q} && cd ${REPODEST_path@Q} && xargs -0r mkdir -pv --"
if ! rsync ${dryrun} "${rsync_flags[@]}" \
-e "ssh ${REPODEST_port:+-p $REPODEST_port}" \
-0 --files-from="$file_list" \
@@ -284,7 +284,7 @@ release_packages() {
fi
msg "Running db-update on repos"
- ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "$(printf 'STAGING=%q db-update' "$REPODEST_path")"
+ ssh ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}" "STAGING=${REPODEST_path@Q} db-update"
if [[ -n $HOOKPOSTRELEASE ]]; then
msg "Running HOOKPOSTRELEASE..."
diff --git a/src/chroot-tools/chcleanup.in b/src/chroot-tools/chcleanup.in
index e72ab45..7826753 100644
--- a/src/chroot-tools/chcleanup.in
+++ b/src/chroot-tools/chcleanup.in
@@ -70,7 +70,7 @@ cp /repo/repo.db /var/lib/pacman/sync/repo.db
# Setup the temporary directory
TEMPDIR="$(mktemp --tmpdir -d "${0##*/}.XXXXXXXXXX")"
-trap "rm -rf -- $(printf '%q' "$TEMPDIR")" EXIT
+trap "rm -rf -- ${TEMPDIR@Q}" EXIT
cp -a /var/lib/pacman/sync "${TEMPDIR}/"
pkglist="${TEMPDIR}"/pkglist.txt
diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool
index 4727450..4c6ef3f 100755
--- a/src/chroot-tools/distcc-tool
+++ b/src/chroot-tools/distcc-tool
@@ -2,7 +2,7 @@
# -*- tab-width: 4; sh-basic-offset: 4 -*-
# distcc-tool
-# Copyright (C) 2013-2014, 2017 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
#
# License: GNU GPLv3+
#
@@ -34,8 +34,6 @@ if ! type gettext &>/dev/null; then
gettext() { echo "$@"; }
fi
-q0="$(printf '%q' "$0")" # quoted $0
-
panic() {
gettext 'panic: malformed call to internal function' >&2
exit 1
@@ -53,7 +51,7 @@ print() {
}
usage() {
- print "Usage: %s COMMAND [COMMAND-ARGS]" "$q0"
+ print "Usage: %q COMMAND [COMMAND-ARGS]" "$0"
print "Tool for using distcc within a networkless chroot"
echo
print "Commands:"
@@ -137,7 +135,7 @@ parse_DISTCC_HOSTS() {
;;
# ZEROCONF
+zeroconf)
- error "%s does not support the +zeroconf option" "$q0"
+ error "%q does not support the +zeroconf option" "$0"
exit 1
;;
# TCP_HOST or OLDSTYLE_TCP_HOST
@@ -161,7 +159,7 @@ parse_DISTCC_HOSTS() {
# set up port forwaring
if $forward_ports; then
- socat TCP-LISTEN:${newport},reuseaddr,fork SYSTEM:"$q0 client $HOSTID ${PORT:-3632}" &
+ socat TCP-LISTEN:${newport},reuseaddr,fork SYSTEM:"${0@Q} client $HOSTID ${PORT:-3632}" &
fi
# add the forwarded port
@@ -221,8 +219,8 @@ odaemon() {
local chrootpath=$1
umask 111
- socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"$q0 server" &
- trap "jobs -p | xargs -r kill --; rm -f -- $(printf '%q' "$chrootpath/socket")" EXIT
+ socat UNIX-LISTEN:"$chrootpath/socket",fork SYSTEM:"${0@Q} server" &
+ trap "jobs -p | xargs -r kill --; rm -f -- ${chrootpath@Q}/socket" EXIT
wait
}
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index d763830..6db11a8 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -479,7 +479,7 @@ main() {
arch-nspawn "$copydir" pacman -Syu --noconfirm
;;
clean-pkgs)
- trap "rm -f -- $(printf '%q ' "$copydir"/{bin/chcleanup,chrootexec})" EXIT
+ trap "rm -f -- ${copydir@Q}/{bin/chcleanup,chrootexec}" EXIT
install -m755 "$(librelib chroot/chcleanup)" "$copydir/bin/chcleanup"
printf '%s\n' \
'#!/bin/bash' \
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index 2efbeea..f5f4855 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -127,7 +127,7 @@ build() (
prepare_chroot "$copydir" "$LIBREHOME" "$repack" false
"${run_ynet[@]}" /chrootprepare "${makepkg_args[@]}" |& indent
run_hook pre_build "$copydir"
- trap "run_hook post_build $(printf '%q' "$copydir")" EXIT
+ trap "run_hook post_build ${copydir@Q}" EXIT
"${run_nnet[@]}" /chrootbuild "${makepkg_args[@]}" |& indent
)