summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-11-18 18:24:09 +0100
committerRobert Günzler <r@gnzler.io>2022-11-18 18:38:24 +0100
commitba5957e9e9a7e9695e014502e40ca2b3b52111bf (patch)
treec852bead886d31e460044fd93a0f64dc050d47ec
parent739b3e702b0f53bd41644795a8c3b6e26465e011 (diff)
bin/xdg-open: fix
-rwxr-xr-xbin/xdg-open10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/xdg-open b/bin/xdg-open
index c26df0f..ab6b346 100755
--- a/bin/xdg-open
+++ b/bin/xdg-open
@@ -2,11 +2,9 @@
 
 set -e
 
-arg0="$(basename "$0")"
-
 container=${container:-}
 if [ ! "${container}" = "firejail" ]; then
-	exec /usr/bin/"${arg0}" $@
+	exec /usr/bin/xdg-open "$@"
 fi
 
 portal() {
@@ -21,7 +19,7 @@ portal() {
 		"" "$1" "{}"
 }
 
-case "$(basename "$0")" in
-xdg-open) portal $@ ;;
-gio) if [ ! "$1" = "open" ]; then exec /usr/bin/$arg0 $@; else portal "${2}"; fi ;;
+case "$0" in
+*xdg-open) portal "$@" ;;
+*gio) if [ ! "$1" = "open" ]; then exec /usr/bin/gio "$@"; else portal "${2}"; fi ;;
 esac