dotfiles/script/installaurpackage

18 lines
305 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
#
# Install an AUR package, passing the Git URL as the only argument.
set -e
if [ -z "$1" ]; then
echo "Usage: installaur <git url>"
exit 1
fi
pkgdir=$HOME/pkg
basename=$(basename "$1" ".git")
cd "$pkgdir"
git clone --depth=1 --quiet "$1" "$basename"
cd "$basename"
makepkg -si