dotfiles/symlinks/bin/aurfetch

33 lines
485 B
Plaintext
Raw Normal View History

2021-01-07 08:09:41 +00:00
#!/bin/bash
# Quick install flag
2022-05-09 11:00:44 +00:00
set -e
2021-01-07 08:09:41 +00:00
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