diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-11-01 21:13:43 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-11-01 21:13:43 +0100 |
commit | 3029c8e4bcaf090327bddd8668a6fa1462e22e42 (patch) | |
tree | 6d926b57f38e11db19215d135ad88b9852f25b96 | |
parent | b8dd44083ae018a94174885330a4723c074b92c7 (diff) |
checkpkg: Fix usage of local mirrors20131101
-rw-r--r-- | checkpkg.in | 18 |
1 files changed, 8 insertions, 10 deletions
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" |