mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
25 lines
511 B
Plaintext
25 lines
511 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
die() {
|
||
|
echo $*
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
if [ "$1" == "" ]; then
|
||
|
echo "usage: aurbuild <package_name>"
|
||
|
echo
|
||
|
exit 1
|
||
|
fi
|
||
|
pkgname=$1
|
||
|
[ -d $pkgname ] && die "Directory '$pkgname' already exists"
|
||
|
[ -f $pkgname ] && die "File '$pkgname' already exists"
|
||
|
|
||
|
echo "Downloading $pkgname.tar.gz"
|
||
|
wget -q http://aur.archlinux.org/packages/$pkgname/$pkgname.tar.gz || die "Failed to fetch $1.pkg.tar.gz"
|
||
|
|
||
|
tar zxf $pkgname.tar.gz || die "Extraction failed"
|
||
|
rm -f $pkgname.tar.gz
|
||
|
cd $pkgname || die "Failed to cwd"
|
||
|
makepkg
|
||
|
|