index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2013-05-15 09:58:43 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-05-18 10:43:16 +1000 |
commit | 8be08f7cae8257af6866febc9d2a57d8d8601a51 (patch) | |
tree | 2587d05ddae79c4ac6cfd36dc1b18d519ac7190b /contrib | |
parent | 72c6d19d64a89a5ad0d162fc0bb6517ea80fc252 (diff) |
-rw-r--r-- | contrib/paccache.sh.in | 7 |
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[@]}" |