summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libretools.conf12
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
+