cleanup pacman module and options

This commit is contained in:
Matt Hamilton 2015-12-29 14:14:13 -05:00
parent dd2806174f
commit 534e627331
2 changed files with 8 additions and 19 deletions

View File

@ -14,22 +14,11 @@ if (( ! ${+commands[pacman]} )); then
return 1 return 1
fi fi
# find if there is a pacman wrapper available (and not set in .zimrc) if (( ! ${+zpacman_frontend} )); then
if [[ ${zpacman_frontend} == 'auto' ]]; then
# no frontend set in config; test for common frontends.
if (( ${+commands[powerpill]} )); then
zpacman_frontend='powerpill'
elif (( ${+commands[pacmatic]} )); then
zpacman_frontend='pacmatic'
else
zpacman_frontend='pacman'
fi
elif (( ! ${+zpacman_frontend} )); then
zpacman_frontend='pacman' zpacman_frontend='pacman'
elif (( ! ${+commands[${zpacman_frontend}]} )); then elif (( ! ${+commands[${zpacman_frontend}]} )); then
print "pacman frontend \"${zpacman_frontend}\" is invalid or not installed. Reverting to \"pacman\"." >&2 print "pacman frontend \"${zpacman_frontend}\" is invalid or not installed. Reverting to \"pacman\".
print "you can fix this error by editing the 'zpacman_frontend' variable in your .zimrc" >&2 you can fix this error by editing the 'zpacman_frontend' variable in your .zimrc" >&2
zpacman_frontend='pacman' zpacman_frontend='pacman'
fi fi
@ -53,16 +42,16 @@ alias pacb='makepkg -sci'
#NOTE: Installing/upgrading individual packages is NOT supported. Sync and upgrade ALL on install. #NOTE: Installing/upgrading individual packages is NOT supported. Sync and upgrade ALL on install.
# install, sync, and upgrade packages # install, sync, and upgrade packages
alias paci='sudo ${zpacman_frontend} -Syu' alias paci="sudo ${zpacman_frontend} -Syu"
# install, sync, and upgrade packages (forcibly refresh package lists) # install, sync, and upgrade packages (forcibly refresh package lists)
alias pacu='sudo ${zpacman_frontend} -Syyu' alias pacu="sudo ${zpacman_frontend} -Syyu"
# install packages by filename # install packages by filename
alias pacU='sudo ${zpacman_frontend} -U' alias pacU="sudo ${zpacman_frontend} -U"
# install all packages in current directory # install all packages in current directory
alias pacd='sudo ${zpacman_frontend} -U *.pkg.tar.xz' alias pacd="sudo ${zpacman_frontend} -U *.pkg.tar.xz"
# #

View File

@ -48,7 +48,7 @@ zssh_ids=(id_rsa)
# Pacman # Pacman
# #
# set (optional) pacman front-end. If not set, zim will attempt to use powerpill or pacmatic if available # set (optional) pacman front-end.
#zpacman_frontend='powerpill' #zpacman_frontend='powerpill'
# load any helper scripts as difined here # load any helper scripts as difined here