Skip to content

Commit

Permalink
wrapGAppsHook: fix $gappsWrapperArgs as intended
Browse files Browse the repository at this point in the history
i.e. define it even if $dontWrapGApps is set, and document the intention.
  • Loading branch information
vcunat committed Nov 9, 2015
1 parent 3f074b8 commit d10b910
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ find_gio_modules() {

envHooks+=(find_gio_modules)

# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
wrapGAppsHook() {
[ -z "$dontWrapGApps" ] || return
dontWrapGApps=1 # guard against running multiple times (e.g. due to propagation)
# guard against running multiple times (e.g. due to propagation)
[ -z "$wrapGAppsHookHasRun" ] || return
wrapGAppsHookHasRun=1

if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then
gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
Expand All @@ -33,10 +35,12 @@ wrapGAppsHook() {
gappsWrapperArgs+=(--prefix $v : "$dummy")
done

for i in $prefix/bin/* $prefix/libexec/*; do
echo "Wrapping app $i"
wrapProgram "$i" "${gappsWrapperArgs[@]}"
done
if [ -z "$dontWrapGApps" ]; then
for i in $prefix/bin/* $prefix/libexec/*; do
echo "Wrapping app $i"
wrapProgram "$i" "${gappsWrapperArgs[@]}"
done
fi
}

fixupOutputHooks+=(wrapGAppsHook)

0 comments on commit d10b910

Please sign in to comment.