Debian Codegraph @

sensible-browser

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 # Prevent recursive loops, where environment variables are set to this script
4 [scip-shell system . . `[`. -n "$__SENSIBLE_BROWSER" ] && exit 126
5 __SENSIBLE_BROWSER="$0"
6 export __SENSIBLE_BROWSER
7
8 Tryscip-shell shell sensible-utils 0.0.26 Try().()
9 {
10 [scip-shell system . . `[`. -z "$__sensible_candidate" ] && return
11 eval "$__sensible_candidate \"\$@\""; ret=$?
12 # 127=ENOENT, 126=couldn't exec for another reason
13 [scip-shell system . . `[`. "$ret" -ne 126 ] && [scip-shell system . . `[`. "$ret" -ne 127 ] && exit "$ret"
14 unset ret
15 }
16
17
18 __sensible_candidate="$BROWSER"
19 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
20
21 if [scip-shell system . . `[`. -n "$DISPLAY" ]; then
22 if [scip-shell system . . `[`. -n "$GNOME_DESKTOP_SESSION_ID" ]; then
23 for __sensible_candidate in gnome-www-browser x-www-browser "gnome-terminal www-browser"; do
24 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
25 done
26 fi
27 for __sensible_candidate in x-www-browser "sensible-terminal -e www-browser"; do
28 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
29 done
30 else
31 __sensible_candidate=www-browser
32 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
33 fi
34
35 command -v gettext > /dev/nullscip-shell filesystem . . `/dev/null`. || alias gettext='printf %s'
36 # shellcheck disable=SC2016
37 TEXTDOMAIN=sensible-utils gettextscip-shell system . . gettext. 'Couldn'\''t find a suitable web browser!
38 Set the $BROWSER environment variable to your desired browser.
39 ' >&2
40 exit 1