diff options
author | Patrick Spek <p.spek@tyil.nl> | 2022-07-03 09:41:47 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2022-07-03 09:41:47 +0200 |
commit | 6145d2c160a450c4fa7fea49400e95113317ce7e (patch) | |
tree | e0ce9271bc2b02d939d20f1cd316bc515fc5ef94 /.local/share/wrapper.sh | |
parent | 65f29dde43cadf7b5349de9992a24826aeea13d4 (diff) |
Yes, this is using an eval now
Diffstat (limited to '.local/share/wrapper.sh')
-rwxr-xr-x | .local/share/wrapper.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/.local/share/wrapper.sh b/.local/share/wrapper.sh index 8857210..5625fd1 100755 --- a/.local/share/wrapper.sh +++ b/.local/share/wrapper.sh @@ -61,26 +61,26 @@ main() # Loop over all possible wrapped options, and run the first one that is # executable - while read -r WRAPPER_BIN + while read -r WRAPPER_CMD do - [ -x "$WRAPPER_BIN" ] || continue + [ -x "$WRAPPER_CMD" ] || continue # Add a firejail wrapper if desired if [ -n "$FIREJAIL_PROFILE" ] then - WRAPPER_BIN="firejail --profile=""$FIREJAIL_PROFILE"" -- $WRAPPER_BIN" + WRAPPER_CMD="firejail --profile=\"$FIREJAIL_PROFILE\" -- $WRAPPER_CMD" fi # Optionally add WRAPPER_OPTS, so theres no double space in # case it is empty. if [ -n "$WRAPPER_OPTS" ] then - WRAPPER_BIN="$WRAPPER_BIN $WRAPPER_OPTS" + WRAPPER_CMD="$WRAPPER_CMD $WRAPPER_OPTS" fi # Run all the things we want to run wrap_before - wrap_run "$WRAPPER_BIN" "$@" + wrap_run "$WRAPPER_CMD" "$@" WRAPPER_EXITCODE=$? wrap_after @@ -100,8 +100,7 @@ wrap_log() { wrap_run() { wrap_log "> $*" - run="$1" ; shift - "$run" "$@" + eval "$@" } wrap_before() { :; } |