From 3029c8e4bcaf090327bddd8668a6fa1462e22e42 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 1 Nov 2013 21:13:43 +0100 Subject: checkpkg: Fix usage of local mirrors --- checkpkg.in | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'checkpkg.in') diff --git a/checkpkg.in b/checkpkg.in index b3894ab..ccbbecd 100644 --- a/checkpkg.in +++ b/checkpkg.in @@ -48,16 +48,14 @@ for _pkgname in "${pkgname[@]}"; do die "The built package (%s) is the one in the repo right now!" "$_pkgname" fi - if [[ ! -f $oldpkg ]]; then - if [[ $pkgurl = file://* ]]; then - ln -s "${pkgurl#file://}" "${pkgurl##file://*/}" - elif [[ -f "$PKGDEST/$oldpkg" ]]; then - ln -s "$PKGDEST/$oldpkg" "$TEMPDIR/$oldpkg" - elif [[ -f "$STARTDIR/$oldpkg" ]]; then - ln -s "$STARTDIR/$oldpkg" "$TEMPDIR/$oldpkg" - else - curl -fsLC - --retry 3 --retry-delay 3 -o "$TEMPDIR/$oldpkg" "$pkgurl" - fi + if [[ $pkgurl = file://* ]]; then + ln -s "${pkgurl#file://}" "$TEMPDIR/$oldpkg" + elif [[ -f "$PKGDEST/$oldpkg" ]]; then + ln -s "$PKGDEST/$oldpkg" "$TEMPDIR/$oldpkg" + elif [[ -f "$STARTDIR/$oldpkg" ]]; then + ln -s "$STARTDIR/$oldpkg" "$TEMPDIR/$oldpkg" + else + curl -fsLC - --retry 3 --retry-delay 3 -o "$TEMPDIR/$oldpkg" "$pkgurl" fi bsdtar tf "$TEMPDIR/$oldpkg" | sort > "$TEMPDIR/filelist-$_pkgname-old" -- cgit v1.2.3-70-g09d2