Commit f01097f2 authored by Rémy Oudompheng's avatar Rémy Oudompheng Committed by Pierre Schmitz
Browse files

Don't prefix package name with './' if package is in $PKGDEST



Commit ad593b8b 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: default avatarRémy Oudompheng <remy@archlinux.org>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent ad593b8b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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