diff options
author | Ionut Biru <ibiru@archlinux.org> | 2010-08-17 15:51:12 +0300 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-08-18 17:30:49 +0200 |
commit | 000d68f7c69d6bd4099e27aafae184bd3a032aeb (patch) | |
tree | e888b33129edc9c1539f587cd3d3ff8727517499 /checkpkg | |
parent | fc6efdc38acc2ac0160a3f3f4064cbb2518da5e6 (diff) | |
download | devtools-000d68f7c69d6bd4099e27aafae184bd3a032aeb.tar.xz |
copy packages into TEMPDIR
TEMPDIR is used before packages are copied into it and made it fail
because cannot find any.
Signed-off-by: Ionut Biru <ibiru@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'checkpkg')
-rwxr-xr-x | checkpkg | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -27,6 +27,7 @@ if [ "$arch" == 'any' ]; then CARCH='any' fi +STARTDIR=$(pwd) TEMPDIR=$(mktemp -d /tmp/checkpkg-script.XXXX) cd $TEMPDIR @@ -34,14 +35,14 @@ for _pkgname in ${pkgname[@]}; do pkgfile=${_pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT} oldstylepkgfile=${_pkgname}-${pkgver}-${pkgrel}${PKGEXT} - if [ -f "$(pwd)/$pkgfile" ]; then - pkgfile=$(pwd)/$pkgfile + if [ -f "$STARTDIR/$pkgfile" ]; then + cp "$STARTDIR/$pkgfile" . elif [ -f "$PKGDEST/$pkgfile" ]; then - pkgfile=$PKGDEST/$pkgfile - elif [ -f "$(pwd)/$oldstylepkgfile" ]; then - pkgfile=$(pwd)/$oldstylepkgfile + cp "$PKGDEST/$pkgfile" . + elif [ -f "$STARTDIR/$oldstylepkgfile" ]; then + cp "$STARTDIR/$oldstylepkgfile" . elif [ -f "$PKGDEST/$oldstylepkgfile" ]; then - pkgfile=$PKGDEST/$oldstylepkgfile + cp "$PKGDEST/$oldstylepkgfile" . else echo "File \"$pkgfile\" doesn't exist" exit 1 |