POSIX rewrite: enter.bash

This commit is contained in:
Syahrial Agni Prasetya 2021-05-27 17:25:30 +07:00
parent 4f5e1144df
commit cdaa7c8aca
No known key found for this signature in database
GPG Key ID: 46F88749C8C79383
2 changed files with 4 additions and 7 deletions

View File

@ -48,7 +48,7 @@ install -v -D -m 755 ./src/archbox-desktop $PREFIX/bin/archbox-desktop
[[ ! -e /etc/archbox.conf || ! -z $FORCE_INSTALL_CONFIG ]] && genconfig > $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/chroot_setup $PREFIX/share/archbox/chroot_setup
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

View File

@ -1,12 +1,9 @@
#!/usr/bin/env bash
source /etc/archbox.conf &>/dev/null
source /tmp/archbox_env &>/dev/null
. /etc/archbox.conf >/dev/null 2>&1
. /tmp/archbox_env >/dev/null 2>&1
REQ_ENV="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS "
REQ_ENV+="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR "
[[ ! -z $DISPLAY ]] && REQ_ENV+="DISPLAY=$DISPLAY "
[[ ! -z $WAYLAND_DISPLAY ]] && REQ_ENV+="WAYLAND_DISPLAY=$WAYLAND_DISPLAY "
REQ_ENV="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR DISPLAY=$DISPLAY WAYLAND_DISPLAY=$WAYLAND_DISPLAY"
ENV="$REQ_ENV $ENV_VAR"
COMMAND="$@"