summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2011-09-17 15:05:35 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-10-07 21:53:03 +0200
commit1df679974786fe4282fd675574d92a464c28f7cb (patch)
tree8203aba86f5a5c3b068702bce6ee60a4a10673cd /makechrootpkg.in
parente41deee5e5d471e90b951b1f68db5dc50c343b0c (diff)
downloaddevtools-1df679974786fe4282fd675574d92a464c28f7cb.tar.xz
makechrootpkg: Always set PKGDEST and SRCDEST
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in16
1 files changed, 6 insertions, 10 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index eb23c61..1bed6b8 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -188,6 +188,10 @@ fi
[[ -z $MAKEFLAGS ]] && eval $(grep '^MAKEFLAGS=' /etc/makepkg.conf)
[[ -z $PACKAGER ]] && eval $(grep '^PACKAGER=' /etc/makepkg.conf)
+# Use PKGBUILD directory if PKGDEST or SRCDEST don't exist
+[[ -d $PKGDEST ]] || PKGDEST=.
+[[ -d $SRCDEST ]] || SRCDEST=.
+
mkdir -p "$copydir/pkgdest"
if ! grep -q 'PKGDEST="/pkgdest"' "$copydir/etc/makepkg.conf"; then
echo 'PKGDEST="/pkgdest"' >> "$copydir/etc/makepkg.conf"
@@ -270,11 +274,7 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
popd >/dev/null
fi
- if [[ -d $PKGDEST ]]; then
- mv "$pkgfile" "$PKGDEST"
- else
- mv "$pkgfile" .
- fi
+ mv "$pkgfile" "$PKGDEST"
done
for l in "$copydir"/build/{namcap,*-{build,check,package,package_*}}.log; do
@@ -287,11 +287,7 @@ fi
for f in "$copydir"/srcdest/*; do
[[ -e $f ]] || continue
- if [[ -d $SRCDEST ]]; then
- mv "$f" "$SRCDEST"
- else
- mv "$f" .
- fi
+ mv "$f" "$SRCDEST"
done
if [[ -e $copydir/build/BUILD_FAILED ]]; then