Compare commits
No commits in common. "7b3de6cef028721ca1acfeb0e93f7b2e695a388a" and "e2789d200b4587f79f51234f28ed276ac2e2ab52" have entirely different histories.
7b3de6cef0
...
e2789d200b
50
pman.sh
50
pman.sh
@ -45,17 +45,9 @@ if [ "$command" = "" ]; then
|
||||
fi
|
||||
|
||||
# Evaluate the command arguments
|
||||
case "$command_args" in
|
||||
"search")
|
||||
if [ "$command_args" = "search" ]; then
|
||||
command_args="-Ss"
|
||||
;;
|
||||
"info")
|
||||
command_args="-Si"
|
||||
;;
|
||||
"localinfo")
|
||||
command_args="-Qi"
|
||||
;;
|
||||
"provides")
|
||||
elif [ "$command_args" = "provides" ]; then
|
||||
# Update the cache
|
||||
su_needed=true
|
||||
command_args="-Fy"
|
||||
@ -63,51 +55,36 @@ case "$command_args" in
|
||||
|
||||
su_needed=false
|
||||
command_args="-F"
|
||||
;;
|
||||
"installed")
|
||||
elif [ "$command_args" = "installed" ]; then
|
||||
command_args="-Q"
|
||||
;;
|
||||
"install")
|
||||
elif [ "$command_args" = "install" ]; then
|
||||
command_args="-S"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
"update")
|
||||
elif [ "$command_args" = "update" ]; then
|
||||
command_args="-Sy"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
"upgradable")
|
||||
elif [ "$command_args" = "upgradable" ]; then
|
||||
command_args="-Qu"
|
||||
;;
|
||||
"upgrade")
|
||||
elif [ "$command_args" = "upgrade" ]; then
|
||||
command_args="-Syu"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
"remove")
|
||||
elif [ "$command_args" = "remove" ]; then
|
||||
command_args="-Rs"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
"purge")
|
||||
elif [ "$command_args" = "purge" ]; then
|
||||
command_args="-Rns"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
"clean")
|
||||
command_args="-Scc"
|
||||
if [ "$command" = "pacman" ]; then
|
||||
su_needed=true
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ "$more_arguments" = "true" ]; then
|
||||
elif [ "$more_arguments" = "true" ]; then
|
||||
echo "Invalid command: \"$command $command_args\""
|
||||
echo
|
||||
echo "Usage: pman <command> [args...]"
|
||||
@ -116,8 +93,6 @@ case "$command_args" in
|
||||
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"
|
||||
@ -126,11 +101,8 @@ case "$command_args" in
|
||||
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
|
||||
fi
|
||||
|
||||
execute_command "${@}"
|
||||
|
Loading…
Reference in New Issue
Block a user