summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2010-10-19 14:44:02 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2010-10-19 14:44:02 -0500
commit7a6f3b6f965198cea63d141b9fbaf7ef177b6a1e (patch)
tree39a42e6fbb24587f841a406a1b9d22ed9f53858c /libremakepkg
parent1d62989f49eb7e8cc387758e9ff623fe947cc418 (diff)
Use XDG_CONFIG_HOME and source that file if it exists
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg10
1 files changed, 5 insertions, 5 deletions
diff --git a/libremakepkg b/libremakepkg
index 0881b10..5ea64de 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -22,13 +22,13 @@ if [ $UID -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi
-if [ ! -e /etc/libretools.conf ]; then
- echo "Config file doesn't exists"
- exit 1
+custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf
+if [-e $custom_config]; then
+ source $custom_config
+else
+ source /etc/libretools.conf
fi
-source /etc/libretools.conf
-
echo "Updating the main chroot"
mkarchroot -u -c ${CACHEDIR} ${CHROOTDIR}/${CHROOT}