Compare commits

..

No commits in common. "7b3de6cef028721ca1acfeb0e93f7b2e695a388a" and "e2789d200b4587f79f51234f28ed276ac2e2ab52" have entirely different histories.

144
pman.sh
View File

@ -45,92 +45,64 @@ if [ "$command" = "" ]; then
fi fi
# Evaluate the command arguments # Evaluate the command arguments
case "$command_args" in if [ "$command_args" = "search" ]; then
"search") command_args="-Ss"
command_args="-Ss" elif [ "$command_args" = "provides" ]; then
;; # Update the cache
"info") su_needed=true
command_args="-Si" command_args="-Fy"
;; execute_command "${@}"
"localinfo")
command_args="-Qi"
;;
"provides")
# Update the cache
su_needed=true
command_args="-Fy"
execute_command "${@}"
su_needed=false su_needed=false
command_args="-F" command_args="-F"
;; elif [ "$command_args" = "installed" ]; then
"installed") command_args="-Q"
command_args="-Q" elif [ "$command_args" = "install" ]; then
;; command_args="-S"
"install") if [ "$command" = "pacman" ]; then
command_args="-S" su_needed=true
if [ "$command" = "pacman" ]; then fi
su_needed=true elif [ "$command_args" = "update" ]; then
fi command_args="-Sy"
;; if [ "$command" = "pacman" ]; then
"update") su_needed=true
command_args="-Sy" fi
if [ "$command" = "pacman" ]; then elif [ "$command_args" = "upgradable" ]; then
su_needed=true command_args="-Qu"
fi elif [ "$command_args" = "upgrade" ]; then
;; command_args="-Syu"
"upgradable") if [ "$command" = "pacman" ]; then
command_args="-Qu" su_needed=true
;; fi
"upgrade") elif [ "$command_args" = "remove" ]; then
command_args="-Syu" command_args="-Rs"
if [ "$command" = "pacman" ]; then if [ "$command" = "pacman" ]; then
su_needed=true su_needed=true
fi fi
;; elif [ "$command_args" = "purge" ]; then
"remove") command_args="-Rns"
command_args="-Rs" if [ "$command" = "pacman" ]; then
if [ "$command" = "pacman" ]; then su_needed=true
su_needed=true fi
fi elif [ "$more_arguments" = "true" ]; then
;; echo "Invalid command: \"$command $command_args\""
"purge") echo
command_args="-Rns" echo "Usage: pman <command> [args...]"
if [ "$command" = "pacman" ]; then echo "Available commands:"
su_needed=true echo " yay (aur) - yay | invoke yay "
fi echo " (aur packages - all the normal operations except config are available)"
;; echo " aur (yay) - yay | same as \"yay\""
"clean") echo " search - pacman -Ss | search packages"
command_args="-Scc" echo " provides - pacman -F | list packages that provide file"
if [ "$command" = "pacman" ]; then echo " installed - pacman -Q | list installed packages"
su_needed=true echo " install - pacman -S | install packages"
fi echo " update - pacman -Sy | updates the repositories"
;; echo " upgradable - pacman -Qu | list available upgrades"
*) echo " upgrade - pacman -Syu | upgrades your system"
if [ "$more_arguments" = "true" ]; then echo " remove - pacman -Rs | remove packages & dependencies"
echo "Invalid command: \"$command $command_args\"" echo " purge - pacman -Rns | remove packages, dependencies & conf"
echo echo " config - /etc/pacman.conf | edits pacman configuration"
echo "Usage: pman <command> [args...]" exit 1
echo "Available commands:" fi
echo " yay (aur) - yay | invoke yay "
echo " (aur packages - all the normal operations except config are available)"
echo " aur (yay) - yay | same as \"yay\""
echo " search - pacman -Ss | search packages"
echo " info - pacman -Si | show package information"
echo " localinfo - pacman -Qi | show local package information"
echo " provides - pacman -F | list packages that provide file"
echo " installed - pacman -Q | list installed packages"
echo " install - pacman -S | install packages"
echo " update - pacman -Sy | updates the repositories"
echo " upgradable - pacman -Qu | list available upgrades"
echo " upgrade - pacman -Syu | upgrades your system"
echo " remove - pacman -Rs | remove packages & dependencies"
echo " purge - pacman -Rns | remove packages, dependencies & conf"
echo " clean - pacman -Scc | remove all package files & trash"
echo " config - /etc/pacman.conf | edits pacman configuration"
exit 1
fi
;;
esac
execute_command "${@}" execute_command "${@}"