Merge pull request #25299 from ahmedtd/fix-wrap-gapps-hook

wrapGAppsHook: Correct `wrapProgram` invocations
This commit is contained in:
Peter Simons 2017-04-29 10:33:52 +02:00 committed by GitHub
commit d1008a9a5f

View File

@ -35,10 +35,16 @@ wrapGAppsHook() {
gappsWrapperArgs+=(--prefix $v : "$dummy")
done
if [ -z "$dontWrapGApps" ]; then
for i in $prefix/bin/* $prefix/libexec/*; do
echo "Wrapping app $i"
wrapProgram "$i" "${gappsWrapperArgs[@]}"
if [[ -z "$dontWrapGApps" ]]; then
targetDirs=( "${prefix}/bin" "${prefix}/libexec" )
for targetDir in "${targetDirs[@]}"; do
if [[ -d "${targetDir}" ]]; then
find "${targetDir}" -type f -executable -print0 \
| while IFS= read -r -d '' file; do
echo "Wrapping program ${file}"
wrapProgram "${file}" "${gappsWrapperArgs[@]}"
done
fi
done
fi
}