index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2013-10-20 16:17:45 -0400 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-11-01 18:52:03 +0100 |
commit | 27441f201c2394a991427f6a47199dd40024497b (patch) | |
tree | 6c97472ae1045e4c49d8ff261235c7a41241e997 /checkpkg.in | |
parent | c4f72f781b851578793b31e2c0b3f7ec839335cf (diff) |
-rw-r--r-- | checkpkg.in | 14 |
diff --git a/checkpkg.in b/checkpkg.in index 4a46df3..b3894ab 100644 --- a/checkpkg.in +++ b/checkpkg.in @@ -29,18 +29,12 @@ STARTDIR=$(pwd) TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX) for _pkgname in "${pkgname[@]}"; do - pkgfile=(${_pkgname}-$(get_full_version $_pkgname)-${CARCH}.pkg.tar?(.?z)) - if (( ${#pkgfile[*]} != 1 )); then - die 'Ambiguous package name: %s\n' "${pkgfile[*]}" + target_pkgver=$(get_full_version "$_pkgname") + if ! pkgfile=$(find_cached_package "$_pkgname" "$target_pkgver" "$CARCH"); then + die 'tarball not found for package: %s' "${_pkgname}-$target_pkgver" fi - if [[ -f "$STARTDIR/$pkgfile" ]]; then - ln -s "$STARTDIR/$pkgfile" "$TEMPDIR/$pkgfile" - elif [[ -f "$PKGDEST/$pkgfile" ]]; then - ln -s "$PKGDEST/$pkgfile" "$TEMPDIR/$pkgfile" - else - die "File \"$pkgfile\" doesn't exist" - fi + ln -s "$pkgfile" "$TEMPDIR" pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm "$_pkgname") |