wrapGAppsHook: Correct wrapProgram
invocations
This change fixes several defects in the way `wrapGAppsHook` selected the executable to wrap. Previously, it would wrap any top-level files in the target `/bin` and `/libexec` directories, including directories and non-executable files. In addition, it failed to wrap files in subdirectories. Now, it uses `find` to iterate over these directory hierarchies, selecting only executable files for wrapping.
This commit is contained in:
parent
100919ab5b
commit
8b9f153bb9
@ -36,9 +36,10 @@ wrapGAppsHook() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$dontWrapGApps" ]; then
|
if [ -z "$dontWrapGApps" ]; then
|
||||||
for i in $prefix/bin/* $prefix/libexec/*; do
|
find "${prefix}/bin" "${prefix}/libexec" -type f -executable -print0 \
|
||||||
echo "Wrapping app $i"
|
| while IFS= read -r -d '' file; do
|
||||||
wrapProgram "$i" "${gappsWrapperArgs[@]}"
|
echo "Wrapping program $file"
|
||||||
|
wrapProgram "$file" "${gappsWrapperArgs[@]}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user