Compare commits
No commits in common. "7b3de6cef028721ca1acfeb0e93f7b2e695a388a" and "e2789d200b4587f79f51234f28ed276ac2e2ab52" have entirely different histories.
7b3de6cef0
...
e2789d200b
48
pman.sh
48
pman.sh
@ -45,17 +45,9 @@ 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
|
||||||
"info")
|
|
||||||
command_args="-Si"
|
|
||||||
;;
|
|
||||||
"localinfo")
|
|
||||||
command_args="-Qi"
|
|
||||||
;;
|
|
||||||
"provides")
|
|
||||||
# Update the cache
|
# Update the cache
|
||||||
su_needed=true
|
su_needed=true
|
||||||
command_args="-Fy"
|
command_args="-Fy"
|
||||||
@ -63,51 +55,36 @@ case "$command_args" in
|
|||||||
|
|
||||||
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
|
||||||
"install")
|
|
||||||
command_args="-S"
|
command_args="-S"
|
||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
;;
|
elif [ "$command_args" = "update" ]; then
|
||||||
"update")
|
|
||||||
command_args="-Sy"
|
command_args="-Sy"
|
||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
;;
|
elif [ "$command_args" = "upgradable" ]; then
|
||||||
"upgradable")
|
|
||||||
command_args="-Qu"
|
command_args="-Qu"
|
||||||
;;
|
elif [ "$command_args" = "upgrade" ]; then
|
||||||
"upgrade")
|
|
||||||
command_args="-Syu"
|
command_args="-Syu"
|
||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
;;
|
elif [ "$command_args" = "remove" ]; then
|
||||||
"remove")
|
|
||||||
command_args="-Rs"
|
command_args="-Rs"
|
||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
;;
|
elif [ "$command_args" = "purge" ]; then
|
||||||
"purge")
|
|
||||||
command_args="-Rns"
|
command_args="-Rns"
|
||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
;;
|
elif [ "$more_arguments" = "true" ]; then
|
||||||
"clean")
|
|
||||||
command_args="-Scc"
|
|
||||||
if [ "$command" = "pacman" ]; then
|
|
||||||
su_needed=true
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ "$more_arguments" = "true" ]; then
|
|
||||||
echo "Invalid command: \"$command $command_args\""
|
echo "Invalid command: \"$command $command_args\""
|
||||||
echo
|
echo
|
||||||
echo "Usage: pman <command> [args...]"
|
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 packages - all the normal operations except config are available)"
|
||||||
echo " aur (yay) - yay | same as \"yay\""
|
echo " aur (yay) - yay | same as \"yay\""
|
||||||
echo " search - pacman -Ss | search packages"
|
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 " provides - pacman -F | list packages that provide file"
|
||||||
echo " installed - pacman -Q | list installed packages"
|
echo " installed - pacman -Q | list installed packages"
|
||||||
echo " install - pacman -S | install packages"
|
echo " install - pacman -S | install packages"
|
||||||
@ -126,11 +101,8 @@ case "$command_args" in
|
|||||||
echo " upgrade - pacman -Syu | upgrades your system"
|
echo " upgrade - pacman -Syu | upgrades your system"
|
||||||
echo " remove - pacman -Rs | remove packages & dependencies"
|
echo " remove - pacman -Rs | remove packages & dependencies"
|
||||||
echo " purge - pacman -Rns | remove packages, dependencies & conf"
|
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"
|
echo " config - /etc/pacman.conf | edits pacman configuration"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
execute_command "${@}"
|
execute_command "${@}"
|
||||||
|
Loading…
Reference in New Issue
Block a user