Fixed that pesky bug and started the aur-helpersG

This commit is contained in:
James McGlashan 2011-11-28 22:38:15 +11:00
commit 7579840bf0
2 changed files with 5 additions and 2 deletions

View file

@ -46,11 +46,14 @@ pacdisowned() {
comm -23 "$fs" "$db" comm -23 "$fs" "$db"
} }
asroot() {
whence sudo && sudo $@ || su -c "$@"
}
pacman() { pacman() {
pacman_bin=${commands[pacman-color]:-/usr/bin/pacman} pacman_bin=${commands[pacman-color]:-/usr/bin/pacman}
case $1 in case $1 in
# The following line is a pure bug, Please fix! -S | -S[^sih]* | -R* | -U*) asroot $pacman_bin $@ ;;
-S | -S[^sih]* | -R* | -U*) =sudo /bin/su -c "$pacman_bin $@" ;;
*) $pacman_bin "$@" ;; *) $pacman_bin "$@" ;;
esac esac
} }