Skip to content

Instantly share code, notes, and snippets.

@badboy
Created February 22, 2009 19:46
Show Gist options
  • Save badboy/68586 to your computer and use it in GitHub Desktop.
Save badboy/68586 to your computer and use it in GitHub Desktop.
#!/bin/bash
function die
{
echo "$1" >&2
exit 1
}
if [ $# -ne 1 ]; then
die "usage: $(basename $0) [package name]"
fi
cd "/home/badboy/code/aur"
if [ -d "$1" ]; then
die "package directory exists"
fi
wget -q http://aur.archlinux.org/packages/${1}/${1}.tar.gz
if [ $? -ne 0 ]; then
die "package not found"
fi
tar -xvf ${1}.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment