summaryrefslogtreecommitdiffstats
path: root/makechrootpkg
diff options
context:
space:
mode:
authorAndrea Scarpino <andrea@archlinux.org>2010-06-28 08:49:56 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-06-28 09:35:20 +0200
commita2132bc899d5a3780ca0bb4caff289b70c954c14 (patch)
tree718de1b89f8895f1090629929c765815c16a86ef /makechrootpkg
parent964c0d1640ad00cdededf1b5d1e26878659c056c (diff)
downloaddevtools-a2132bc899d5a3780ca0bb4caff289b70c954c14.tar.gz
devtools-a2132bc899d5a3780ca0bb4caff289b70c954c14.tar.xz
read {SRC, PKG}DEST from user makepkg.conf
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg6
1 files changed, 4 insertions, 2 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 01cb3a9..b54ad81 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -134,8 +134,10 @@ if [ "$REPACK" != "1" ]; then
fi
# Get SRC/PKGDEST from makepkg.conf
-SRCDEST=$(grep '^SRCDEST=' /etc/makepkg.conf | cut -d= -f2)
-PKGDEST=$(grep '^PKGDEST=' /etc/makepkg.conf | cut -d= -f2)
+SRCDEST=$(grep '^SRCDEST=' ~/.makepkg.conf | cut -d= -f2)
+[ -z ${SRCDEST} ] && SRCDEST=$(grep '^SRCDEST=' /etc/makepkg.conf | cut -d= -f2)
+PKGDEST=$(grep '^PKGDEST=' ~/.makepkg.conf | cut -d= -f2)
+[ -z ${PKGDEST} ] && PKGDEST=$(grep '^PKGDEST=' /etc/makepkg.conf | cut -d= -f2)
[ -d "$copydir/pkgdest" ] || mkdir "$copydir/pkgdest"
if ! grep 'PKGDEST=/pkgdest' "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then