diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2010-10-26 17:43:49 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2010-10-26 17:43:49 -0300 |
commit | 46ba7237fc28b27f1a98df030f2b759404ee493b (patch) | |
tree | 7044d429e260516c5656dc3cafe1638afc10a4ec /libretools.conf | |
parent | 4ecf6b27871b4384fc6ff66f46870f3e6f850ec6 (diff) |
Fixed detecting default CacheDir from pacman.conf
Added checking for missing variables
Diffstat (limited to 'libretools.conf')
-rw-r--r-- | libretools.conf | 12 |
1 files changed, 11 insertions, 1 deletions
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 + |