[arch-dev-public] [devtools] [PATCH] read {SRC, PKG}DEST from user makepkg.conf

Andrea Scarpino andrea at archlinux.org
Fri Jun 25 09:09:42 EDT 2010


Everytime that I build KDE in a new system I fall into this.

Should be ok now.

From 0120495d9ff6729ca20bd9a0fef56f709738aa79 Mon Sep 17 00:00:00 2001
From: Andrea Scarpino <andrea at archlinux.org>
Date: Fri, 25 Jun 2010 15:04:13 +0200
Subject: [PATCH] read SRC/PKGDEST from ~/.makepkg.conf too

---
 makechrootpkg |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/makechrootpkg b/makechrootpkg
index 779786e..5a77462 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
-- 
1.7.1

-- 
Andrea Scarpino - andreascarpino.it
KDE Maintainer in Arch Linux


More information about the arch-dev-public mailing list