From 46ba7237fc28b27f1a98df030f2b759404ee493b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Tue, 26 Oct 2010 17:43:49 -0300 Subject: Fixed detecting default CacheDir from pacman.conf Added checking for missing variables --- libretools.conf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libretools.conf') diff --git a/libretools.conf b/libretools.conf index 4172f40..a83c8c4 100644 --- a/libretools.conf +++ b/libretools.conf @@ -8,7 +8,7 @@ CHROOT=root CHCOPY=copy # Obtains CacheDir from pacman.conf -CACHEDIR=`grep "^CacheDir" /etc/pacman.conf | cut -d'=' -f2` +CACHEDIR=`grep "^#\?CacheDir" /etc/pacman.conf | cut -d'=' -f2` # Parabola hostname (should be the same used on ssh_config PARABOLAHOST=parabola @@ -36,3 +36,13 @@ LIBRESRCDIR=parabolagnulinux.org/repo/pkgbuilds # $ cd pkgbuild/dir # $ ssh parabola -fN # $ librerelease extra + + +# Checks if vars aren't empty +for VAR in CHROOTDIR CHROOT CHCOPY CACHEDIR PARABOLAHOST LIBREDESTDIR LIBRESRCDIR; do + [[ -z ${!VAR} ]] && { + echo "Configure $VAR var in $0" + exit 1 + } +done + -- cgit v1.2.2