Skip to content

Commit 7ca137d

Browse files
authored
change hook run order, stop printing to stderr
1 parent e655d12 commit 7ca137d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

useful-tools/bin/AppRun-generic

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ _get_main_bin_name
4848
for hook in "$CURRENTDIR"/bin/*.hook; do
4949
[ -x "$hook" ] || continue
5050
case "$hook" in
51-
*.bg.hook) >&2 echo "exec bg hook: $hook"; "$hook" &;;
52-
*.src.hook) >&2 echo "source hook: $hook"; . "$hook";;
53-
*.hook) >&2 echo "exec hook: $hook"; "$hook" ;;
51+
*.src.hook) continue ;;
52+
*.bg.hook) "$hook" &;;
53+
*.hook) "$hook" ;;
5454
esac
5555
done
5656

57+
# source hooks need to run last
58+
for hook in "$CURRENTDIR"/bin/*.src.hook; do
59+
[ -e "$hook" ] || continue
60+
. "$hook"
61+
done
62+
5763
# If LD_DEBUG=libs is set outside the AppImage the output is not helpful
5864
# because it will include the libs of sh, grep, cat, etc from the hooks
5965
# with this var we can set LD_DEBUG=libs for the bundled application only

0 commit comments

Comments
 (0)