From 2a0db3033dacf8540b17bc21f4590e9f4d2decab Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 00:07:25 +0700 Subject: [PATCH] Allow /etc custom location. --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 09454e5..d78b04b 100755 --- a/install.sh +++ b/install.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash -ROOT_DIR="${ROOT_DIR:-/}" -PREFIX="${PREFIX:-${ROOT_DIR}usr/local}" +ETC_DIR="${ETC_DIR:-/etc}" +PREFIX="${PREFIX:-/usr/local}" mkdir -p $PREFIX/share/archbox/bin install -v -D -m 755 ./src/archbox.bash $PREFIX/bin/archbox install -v -D -m 755 ./src/archbox-desktop.bash $PREFIX/bin/archbox-desktop -[[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./src/archbox.conf ${ROOT_DIR}etc/archbox.conf +[[ ! -e $ETC_DIR/archbox.conf ]] && install -v -D -m 755 ./src/archbox.conf $ETC_DIR/archbox.conf install -v -D -m 755 ./src/exec.bash $PREFIX/share/archbox/bin/exec install -v -D -m 755 ./src/enter.bash $PREFIX/share/archbox/bin/enter install -v -D -m 755 ./src/chroot_setup.bash $PREFIX/share/archbox/chroot_setup.bash install -v -D -m 755 ./src/init.bash $PREFIX/share/archbox/bin/init install -v -D -m 755 ./src/uth.bash $PREFIX/share/archbox/bin/uth -grep 'PREFIX=' ${ROOT_DIR}etc/archbox.conf >/dev/null 2>&1 || cat << EOF >> ${ROOT_DIR}etc/archbox.conf +grep 'PREFIX=' $ETC_DIR/archbox.conf >/dev/null 2>&1 || cat << EOF >> $ETC_DIR/archbox.conf # Don't change this unless you know what you're doing. PREFIX="$PREFIX"