1 ## PKGBUILD [plain_text]
3 # Contributor: Joshua Neuhard <fester4200@gmail.com>
7 pkgdesc="Automatic Nvidia/Ati Driver Installer For Archlinux"
9 url="http://sgfxi.googlecode.com"
10 license=('GPLv2 or any later version')
14 ## note a few things here: we test for bad wget download, remove pkg if error
15 ## then test for EOF marker in file to ensure complete download occured, if so
16 ## install it. If no EOF file, the file download was corrupted and the installer
17 ## returns error after deleting the corrupted file.
19 local sgfxiName="sgfxi"
21 wget -O $sgfxiName "http://sgfxi.googlecode.com/svn/trunk/$sgfxiName"
22 # test wget return value, on error kill rm and return error
23 if [ "$?" -ne 0 ];then
24 if [ -f "$sgfxiName" ];then
26 echo "Removing $sgfxiName file because of wget error..."
28 echo "$sgfxiName PackageBuild failed due to wget error."
31 # test for script EOF marker, if there, success
32 elif [ -n "$( grep -si '##\*\*EOF\*\*##' $sgfxiName )" ];then
33 install -D -m 755 $sgfxiName $pkgdir/usr/bin/$sgfxiName
35 # if not, failure, rm if file exists
37 if [ -f "$sgfxiName" ];then
39 echo "Removing $sgfxiName file because of data corruption error..."
41 echo "$sgfxiName PackageBuild failed due to file corruption error."