Added functions to ease aur usage

This commit is contained in:
lanxu 2019-06-09 17:14:30 +03:00
parent 3fc0e445d4
commit 53e89ae8b4

29
.zshrc
View File

@ -65,3 +65,32 @@ source $HOME/.config/base16-shell/scripts/base16-default-dark.sh
#bindkey "${terminfo[khome]}" beginning-of-line
#bindkey "${terminfo[kend]}" end-of-line
export TERMCMD=termite
function auradd {
pkg=$1
aur sync --no-view --no-confirm --database custom "$pkg" >&2
sudo pacman -Sy "$pkg"
}
function aurrm {
pkg=$1
rm_out=$(repo-remove /var/cache/pacman/custom/custom.db.tar "$pkg" 2>&1)
if [[ $rm_out = *"ERROR"* ]]; then
echo "not found" >&2
else
rm -rf /var/cache/pacman/custom/"$pkg"*.pkg.* || true
echo "$pkg removed"
fi
sudo pacman -Sy
sudo pacman -Rnc "$pkg"
}
function aurupdate {
aur sync --no-view --no-confirm --database custom -u
sudo pacman -Syu
}
function aurls {
sudo pacman -Sl custom
}