You are not logged in.
Pages: 1
Nothing special here. However, could be useful for someone.
#!/bin/bash
##
## Awfully coded by Rick Rein <jeebusroxors@gmail.com>
##
buildir="~/builds"
exeme(){
cd $buildir
printf "\033[33;1mRetrieving $pname from the AUR\n\033[0m"
wget -nv -nc http://aur.archlinux.org/packages/$pname/$pname.tar.gz || exit 1
echo
printf "\033[33;1mUnpacking $pname.tar.gz\n\033[0m"
tar xzf $pname.tar.gz || exit 1
cd $pname
$edit
$pins
if [ -z "$rp" ]; then
echo $rp
exit
fi
printf "\033[33;1mRemoving ../$pname.tar.gz\n\033[0m"
$rp
printf "Done - Bye Bye\n"
}
if [ -z "$1" ]; then
echo "usage: $0 -i -e -b -n pkgname"
printf "\t-i build and install (makepkg -i)\n"
printf "\t-b build (makepkg)\n"
printf "\t-e edit ($EDITOR PKGBUILD)\n"
printf "\t-n Don't delete package tar\n"
exit
fi
eval pname=\$$#
rp="rm ../$pname.tar.gz"
while getopts "iebn" flag
do
case $flag in
e) edit="vi PKGBUILD";;
i) pins="makepkg -i" ;;
b) pins="makepkg";;
n) rp="";;
esac
done
exeme
./script foo with no options grabs the tarball, extracts into ~/builds and removes foo's tar.gz
-i builds and installs (makepkg -i)
-e edits PKGBUILD
-b builds (makepkg)
-n disables the remove of the package tarball.
Enjoy.
There's no place like 127.0.0.1
Offline
Pages: 1