2020-12-28 05:22:53 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-10-27 06:12:14 +00:00
|
|
|
|
2021-05-16 17:07:25 +00:00
|
|
|
ETC_DIR="${ETC_DIR:-/etc}"
|
|
|
|
PREFIX="${PREFIX:-/usr/local}"
|
2021-01-23 09:06:38 +00:00
|
|
|
|
|
|
|
mkdir -p $PREFIX/share/archbox/bin
|
2021-05-16 16:16:30 +00:00
|
|
|
install -v -D -m 755 ./src/archbox.bash $PREFIX/bin/archbox
|
|
|
|
install -v -D -m 755 ./src/archbox-desktop.bash $PREFIX/bin/archbox-desktop
|
2021-05-17 06:57:53 +00:00
|
|
|
[[ ! -e /etc/archbox.conf || ! -z $FORCE_INSTALL_CONFIG ]] && ./genconfig.sh > $ETC_DIR/archbox.conf
|
2021-05-16 16:16:30 +00:00
|
|
|
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
|
2021-01-23 09:06:38 +00:00
|
|
|
|
2021-05-16 17:07:25 +00:00
|
|
|
grep 'PREFIX=' $ETC_DIR/archbox.conf >/dev/null 2>&1 || cat << EOF >> $ETC_DIR/archbox.conf
|
2021-01-23 09:06:38 +00:00
|
|
|
|
|
|
|
# Don't change this unless you know what you're doing.
|
|
|
|
PREFIX="$PREFIX"
|
|
|
|
EOF
|
2020-11-03 15:45:26 +00:00
|
|
|
[[ -z $1 ]] && exit 0
|
|
|
|
|
2020-11-02 12:36:27 +00:00
|
|
|
if [ $1 = "--exp" ]; then
|
2021-05-16 16:16:30 +00:00
|
|
|
install -v -D -m 755 ./src/exp/startx-killxdg.bash $PREFIX/bin/startx-killxdg
|
2020-11-03 15:45:26 +00:00
|
|
|
else
|
|
|
|
echo "Unknown install option: $1"
|
2020-11-02 12:36:27 +00:00
|
|
|
fi
|