From ed3b5b3802628b798a435d8421a598908be542d8 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Sun, 16 May 2021 23:16:30 +0700 Subject: [PATCH] Move sources into a dir. --- install.sh | 23 ++++++++++--------- .../archbox-desktop.bash | 0 archbox.bash => src/archbox.bash | 0 archbox.conf => src/archbox.conf | 0 chroot_setup.bash => src/chroot_setup.bash | 0 enter.bash => src/enter.bash | 0 exec.bash => src/exec.bash | 0 init.bash => src/init.bash | 0 uth.bash => src/uth.bash | 0 9 files changed, 12 insertions(+), 11 deletions(-) rename archbox-desktop.bash => src/archbox-desktop.bash (100%) rename archbox.bash => src/archbox.bash (100%) rename archbox.conf => src/archbox.conf (100%) rename chroot_setup.bash => src/chroot_setup.bash (100%) rename enter.bash => src/enter.bash (100%) rename exec.bash => src/exec.bash (100%) rename init.bash => src/init.bash (100%) rename uth.bash => src/uth.bash (100%) diff --git a/install.sh b/install.sh index f4a0d17..9dd8270 100755 --- a/install.sh +++ b/install.sh @@ -1,18 +1,19 @@ #!/usr/bin/env bash -PREFIX="/usr/local" +ROOT="${ROOT:-/}" +PREFIX="${PREFIX:-${ROOT}usr/local}" mkdir -p $PREFIX/share/archbox/bin -install -v -D -m 755 ./archbox.bash $PREFIX/bin/archbox -install -v -D -m 755 ./archbox-desktop.bash $PREFIX/bin/archbox-desktop -[[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./archbox.conf /etc/archbox.conf -install -v -D -m 755 ./exec.bash $PREFIX/share/archbox/bin/exec -install -v -D -m 755 ./enter.bash $PREFIX/share/archbox/bin/enter -install -v -D -m 755 ./chroot_setup.bash $PREFIX/share/archbox/chroot_setup.bash -install -v -D -m 755 ./init.bash $PREFIX/share/archbox/bin/init -install -v -D -m 755 ./uth.bash $PREFIX/share/archbox/bin/uth +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}etc/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=' /etc/archbox.conf >/dev/null 2>&1 || cat << EOF >> /etc/archbox.conf +grep 'PREFIX=' ${ROOT}etc/archbox.conf >/dev/null 2>&1 || cat << EOF >> ${ROOT}etc/archbox.conf # Don't change this unless you know what you're doing. PREFIX="$PREFIX" @@ -20,7 +21,7 @@ EOF [[ -z $1 ]] && exit 0 if [ $1 = "--exp" ]; then - install -v -D -m 755 ./exp/startx-killxdg.bash $PREFIX/bin/startx-killxdg + install -v -D -m 755 ./src/exp/startx-killxdg.bash $PREFIX/bin/startx-killxdg else echo "Unknown install option: $1" fi diff --git a/archbox-desktop.bash b/src/archbox-desktop.bash similarity index 100% rename from archbox-desktop.bash rename to src/archbox-desktop.bash diff --git a/archbox.bash b/src/archbox.bash similarity index 100% rename from archbox.bash rename to src/archbox.bash diff --git a/archbox.conf b/src/archbox.conf similarity index 100% rename from archbox.conf rename to src/archbox.conf diff --git a/chroot_setup.bash b/src/chroot_setup.bash similarity index 100% rename from chroot_setup.bash rename to src/chroot_setup.bash diff --git a/enter.bash b/src/enter.bash similarity index 100% rename from enter.bash rename to src/enter.bash diff --git a/exec.bash b/src/exec.bash similarity index 100% rename from exec.bash rename to src/exec.bash diff --git a/init.bash b/src/init.bash similarity index 100% rename from init.bash rename to src/init.bash diff --git a/uth.bash b/src/uth.bash similarity index 100% rename from uth.bash rename to src/uth.bash