summaryrefslogtreecommitdiffstats
path: root/commitpkg
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-03-27 13:50:13 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-03-28 14:57:22 +0200
commitf01097f22c4651b73e282f2c0659609e6f545212 (patch)
tree8e283696d6409df6d2960edf29b13df73f15f53e /commitpkg
parentad593b8b61558da779530a6cb8f4938a273f5553 (diff)
downloaddevtools-f01097f22c4651b73e282f2c0659609e6f545212.tar.gz
devtools-f01097f22c4651b73e282f2c0659609e6f545212.tar.xz
Don't prefix package name with './' if package is in $PKGDEST
Commit ad593b8b61558da779530a6cb8f4938a273f5553 introduces a problem when $PKGDEST is set and the package to transfer has an absolute pathname. In this case there is no need to add anything to have rsync work properly. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'commitpkg')
-rwxr-xr-xcommitpkg8
1 files changed, 5 insertions, 3 deletions
diff --git a/commitpkg b/commitpkg
index 041a794..dfc2bd1 100755
--- a/commitpkg
+++ b/commitpkg
@@ -125,15 +125,17 @@ for _arch in ${arch[@]}; do
pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
- if [ ! -f "$pkgfile" -a -f "$pkgdestfile" ]; then
+ if [ -f "$pkgfile" ]; then
+ pkgfile="./$pkgfile"
+ elif [ -f "$pkgdestfile" ]; then
pkgfile="$pkgdestfile"
- elif [ ! -f "$pkgfile" ]; then
+ else
echo "skipping ${_arch}"
continue 2
fi
echo -n 'uploading '
- rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "./${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
+ rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
done
archrelease $repo-${_arch} || abort
done