Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/checkupdates.sh.in2
-rw-r--r--contrib/paccache.sh.in7
2 files changed, 4 insertions, 5 deletions
diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in
index 9244d85a..b41dfa03 100644
--- a/contrib/checkupdates.sh.in
+++ b/contrib/checkupdates.sh.in
@@ -32,7 +32,7 @@ fi
trap 'rm -f $CHECKUPDATE_DB/db.lck' INT TERM EXIT
DBPath="${DBPath:-@localstatedir@/lib/pacman/}"
-eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' /etc/pacman.conf)
+eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' @sysconfdir@/pacman.conf)
mkdir -p "$CHECKUPDATE_DB"
ln -s "${DBPath}/local" "$CHECKUPDATE_DB" &> /dev/null
diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in
index 64c3c536..a9c6524f 100644
--- a/contrib/paccache.sh.in
+++ b/contrib/paccache.sh.in
@@ -109,8 +109,7 @@ runcmd() {
if sudo -v &>/dev/null && sudo -l &>/dev/null; then
sudo "$@"
else
- printf '%s ' 'root'
- su -c "$(printf '%q ' "$@")"
+ die 'Unable to escalate privileges using sudo'
fi
else
"$@"
@@ -308,9 +307,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum }
# crush. kill. destroy.
(( verbose )) && cmdopts+=(-v)
if (( delete )); then
- runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}"
+ printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}"
elif (( move )); then
- runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") mv "${cmdopts[@]}" -t "$movedir"
+ printf '%s\0' "${candidates[@]}" | runcmd xargs -0 mv "${cmdopts[@]}" -t "$movedir"
fi
summarize "$pkgcount" "${candidates[@]}"