Compare commits
4 Commits
7b3de6cef0
...
1.1.2
Author | SHA1 | Date | |
---|---|---|---|
af686fe6c0 | |||
ba07f6275d | |||
8e2bdd88d3 | |||
8b23dc96a3 |
16
README.md
16
README.md
@@ -1,15 +1,23 @@
|
|||||||
# pman.sh
|
# pman.sh
|
||||||
A `pacman` helper script, because you forget the stupid flags
|
A `pacman` helper script, because you forget all the stupid flags
|
||||||
|
|
||||||
## Usage / Features:
|
## Usage / Features:
|
||||||
|
- aur/yay
|
||||||
- search
|
- search
|
||||||
|
- info
|
||||||
|
- localinfo
|
||||||
|
- provides
|
||||||
|
- providefiles
|
||||||
|
- installed
|
||||||
|
- install
|
||||||
- update
|
- update
|
||||||
- upgradable
|
- upgradable
|
||||||
- upgrade
|
- upgrade
|
||||||
- install
|
- remove
|
||||||
- provides
|
- purge
|
||||||
|
- clean
|
||||||
- config
|
- config
|
||||||
|
|
||||||
`config` is the only flag that is not appended to `pacman`, instead it resolves to `nano /etc/pacman.conf`.
|
`config` is the only flag that is not appended to `pacman` (or `yay`), instead it resolves to `nano /etc/pacman.conf`.
|
||||||
|
|
||||||
`sudo` gets prepended automatically if the command requires it and if installed - no, there is no check if your user is in the `sudo` group, if you download this script you should already be, or know you can only use part of this utility
|
`sudo` gets prepended automatically if the command requires it and if installed - no, there is no check if your user is in the `sudo` group, if you download this script you should already be, or know you can only use part of this utility
|
||||||
|
19
pman.sh
19
pman.sh
@@ -64,6 +64,15 @@ case "$command_args" in
|
|||||||
su_needed=false
|
su_needed=false
|
||||||
command_args="-F"
|
command_args="-F"
|
||||||
;;
|
;;
|
||||||
|
"providefiles")
|
||||||
|
# Update the cache
|
||||||
|
su_needed=true
|
||||||
|
command_args="-Fy"
|
||||||
|
execute_command "${@}"
|
||||||
|
|
||||||
|
su_needed=false
|
||||||
|
command_args="-Fl"
|
||||||
|
;;
|
||||||
"installed")
|
"installed")
|
||||||
command_args="-Q"
|
command_args="-Q"
|
||||||
;;
|
;;
|
||||||
@@ -78,6 +87,13 @@ case "$command_args" in
|
|||||||
if [ "$command" = "pacman" ]; then
|
if [ "$command" = "pacman" ]; then
|
||||||
su_needed=true
|
su_needed=true
|
||||||
fi
|
fi
|
||||||
|
execute_command "${@}"
|
||||||
|
|
||||||
|
su_needed=false
|
||||||
|
command_args="-Qu"
|
||||||
|
echo
|
||||||
|
echo "$(execute_command "${@}" | wc -l) packages are available for update"
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
"upgradable")
|
"upgradable")
|
||||||
command_args="-Qu"
|
command_args="-Qu"
|
||||||
@@ -108,7 +124,7 @@ case "$command_args" in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ "$more_arguments" = "true" ]; then
|
if [ "$more_arguments" = "true" ]; then
|
||||||
echo "Invalid command: \"$command $command_args\""
|
echo "Invalid command: \"$command_args\""
|
||||||
echo
|
echo
|
||||||
echo "Usage: pman <command> [args...]"
|
echo "Usage: pman <command> [args...]"
|
||||||
echo "Available commands:"
|
echo "Available commands:"
|
||||||
@@ -119,6 +135,7 @@ case "$command_args" in
|
|||||||
echo " info - pacman -Si | show package information"
|
echo " info - pacman -Si | show package information"
|
||||||
echo " localinfo - pacman -Qi | show local 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 " providefiles - pacman -Fl | list files provided by package"
|
||||||
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"
|
||||||
echo " update - pacman -Sy | updates the repositories"
|
echo " update - pacman -Sy | updates the repositories"
|
||||||
|
Reference in New Issue
Block a user