-
-
Save KittyKatt/5942646 to your computer and use it in GitHub Desktop.
pacman wrapper script for kori (ayakashi)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i had a giggle