From 148b2bb84dc4d3af87e778bae3a639c2fad71e02 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 12 Jan 2024 13:58:01 -0500 Subject: [PATCH] bin/bwrap: exit if not on Linux and source bwrap extra --- bin/bwrap.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/bwrap.bash b/bin/bwrap.bash index b00f7e3..cb953b7 100755 --- a/bin/bwrap.bash +++ b/bin/bwrap.bash @@ -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[@]}" "$@"