dotfiles/symlinks/bin/aurfetch

31 lines
477 B
Plaintext
Raw Normal View History

2021-01-07 08:09:41 +00:00
#!/bin/bash
# Quick install flag
quick=
while getopts q name
do
case $name in
q) quick=1;;
?) echo "Usage: aurfetch [-q] packagename\n"
exit 2;;
esac
done
# Move away from options
shift $(($OPTIND - 1))
if [ -z "$1" ]; then
echo "Missing package name!"
else
LOC=$PWD
PKG_NAME=$1
git clone https://aur.archlinux.org/$PKG_NAME.git $AUR_INSTALL_HOME/$PKG_NAME
cd $AUR_INSTALL_HOME/$PKG_NAME
if [ -z "$quick" ]; then
vim PKGBUILD
fi
makepkg -si
cd $LOC
fi