Skip to content

Instantly share code, notes, and snippets.

@KittyKatt
Created July 7, 2013 07:15
Show Gist options
  • Save KittyKatt/5942646 to your computer and use it in GitHub Desktop.
Save KittyKatt/5942646 to your computer and use it in GitHub Desktop.
pacman wrapper script for kori (ayakashi)
#!/usr/bin/env bash
# Pacman alias wrapper for kori
# Requires: pacman
if [[ -n "$1" ]]; then
case "$1" in
"install")
shift 1
if [[ -n "$1" ]]; then
sudo pacman -S $@
else
echo "Error! You have to specify a package to install!"
exit 1
fi
;;
"purge")
shift 1
if [[ -n "$1" ]]; then
sudo pacman -Rcns $@
else
echo "Error! You have to specify a package to remove and purge!"
exit 1
fi
;;
"search")
shift 1
if [[ -n "$1" ]]; then
sudo pacman -Ss $@
else
echo "Error! You must specify a search term!"
exit 1
fi
;;
"upgrade") sudo pacman -Syu;;
"clean") sudo pacman -Sc;;
*) sudo pacman "${@}";;
# *) echo 'Error! Improper command. Please use one of the following: install, purge, search, upgrade, clean.'; exit 1;;
esac
else
echo "Error! You gotta specify a command, silly!"
exit 1
fi
@hirigaray
Copy link

Thanks!

@Zanthas
Copy link

Zanthas commented Sep 18, 2015

i had a giggle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment