bin/bwrap: exit if not on Linux and source bwrap extra

This commit is contained in:
Infinidoge 2024-01-12 13:58:01 -05:00
parent 83d96e9172
commit 148b2bb84d
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A

View file

@ -1,5 +1,9 @@
#!/usr/bin/env bash
if [ "$(uname)" != "Linux" ]; then
exit 0
fi
if [ -z ${NIXDIR+x} ]; then
echo "NIXDIR is unset! It needs to be set in the code. Edit this shell file and read the instructions."
echo "Executing bash without Bubblewrap…"
@ -58,4 +62,6 @@ devbind \
/usr \
/var
[[ -f "$HOME/.bwrap-extra.bash" ]] && source "$HOME/.bwrap-extra.bash"
exec bwrap "${args[@]}" "$@"