index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nezmer <git@nezmer.info> | 2010-10-12 02:23:16 +0300 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-10-11 20:29:22 -0500 |
commit | 05f0a28932c1acab7a9ddb58435d69626dad54da (patch) | |
tree | 86b901ee3ba6fc6ba6d7219de38e68d70d092742 /contrib/wget-xdelta.sh.in | |
parent | bce3c8efc7a2d187984aa0e7037307b99c217fd7 (diff) |
-rwxr-xr-x | contrib/wget-xdelta.sh.in | 10 |
diff --git a/contrib/wget-xdelta.sh.in b/contrib/wget-xdelta.sh.in index 4656f4dd..caf0171e 100755 --- a/contrib/wget-xdelta.sh.in +++ b/contrib/wget-xdelta.sh.in @@ -1,7 +1,7 @@ -#!/bin/bash +#!@BASH@ -if [ -r "/etc/makepkg.conf" ]; then - source /etc/makepkg.conf +if [ -r "@sysconfdir@/makepkg.conf" ]; then + source @sysconfdir@/makepkg.conf else echo "wget-xdelta: Unable to find makepkg.conf" exit 1 @@ -30,11 +30,11 @@ new_version=$(echo $pkg_data | cut -d ' ' -f 2) base_url=${file_url%/*} # Look for the last version -for file in $(ls -r /var/cache/pacman/pkg/${pkgname}-*-*{,-$CARCH}$PKGEXT 2>/dev/null); do +for file in $(ls -r @localstatedir@/cache/pacman/pkg/${pkgname}-*-*{,-$CARCH}$PKGEXT 2>/dev/null); do [[ "$file" =~ "$CARCH" ]] && arch="-$CARCH" || arch="" check_version=$(echo $file | \ sed "s|^.*/${pkgname}-\([[:alnum:]_\.]*-[[:alnum:]_\.]*\)${arch}$PKGEXT$|\1|" | \ - grep -v "^/var/cache/pacman/pkg") + grep -v "^@localstatedir@/cache/pacman/pkg") [ "$check_version" = "" ] && continue |