Skip to content

Instantly share code, notes, and snippets.

@gld1982ltd
Created October 1, 2014 14:53
Show Gist options
  • Save gld1982ltd/e5c83d43de48683a8edc to your computer and use it in GitHub Desktop.
Save gld1982ltd/e5c83d43de48683a8edc to your computer and use it in GitHub Desktop.
pm - package management with pacman and yaourt
#/bin/sh
# pm - Custom Pacman functions
# usage pm [option] [package(s)]
case $1 in
-i) yaourt -S "${@:2}" ;;
-u) yaourt -Syua "${@:2}" ;;
-r) sudo pacman -Rns "${@:2}" ;;
-s) yaourt -Ss "${@:2}" ;;
-q) yaourt -Qi "${@:2}" ;;
info) yaourt -Si "${@:2}" ;;
exp) sudo pacman -D --asexp "${@:2}" ;;
imp) sudo pacman -D --asdep "${@:2}" ;;
clean) sudo pacman -Rs $(pacman -Qtdq) ;;
*|-h) printf "
Usage: pm [option] [package(s)]
-i \t install packages
-u \t upgrade packages
-r \t remove packages
-s \t search packages
-q \t find local package info
info \t find remote package info
exp \t mark package as explicit
imp \t mark as implicit
clean \t remove unneeded packages
-h \t print this help and exit
\n" ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment