aboutsummaryrefslogtreecommitdiff
path: root/.local/share/wrapper.sh
diff options
context:
space:
mode:
Diffstat (limited to '.local/share/wrapper.sh')
-rwxr-xr-x.local/share/wrapper.sh13
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() { :; }