summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-01 16:51:43 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-01 16:51:43 +0200
commite656ec7052d90a2501f31ed350137e81ea3136ae (patch)
treeb7b28923a56897365893eb33ebcfe667366c76f4
parentdcc7b6728d3b671e26638124f962ba8de0b9dbcd (diff)
Check if ~/.makepkg.conf exists
Fixes FS#20041
-rwxr-xr-xmakechrootpkg6
1 files changed, 4 insertions, 2 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 79dc517..4ff69b0 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -133,9 +133,11 @@ if [ "$REPACK" != "1" ]; then
fi
# Get SRC/PKGDEST from makepkg.conf
-SRCDEST=$(grep '^SRCDEST=' ~/.makepkg.conf | cut -d= -f2)
+if [ -f ~/.makepkg.conf ]; then
+ SRCDEST=$(grep '^SRCDEST=' ~/.makepkg.conf | cut -d= -f2)
+ PKGDEST=$(grep '^PKGDEST=' ~/.makepkg.conf | cut -d= -f2)
+fi
[ -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"