wrapQtAppsHook: actually use makeQtWrapper for symlinks

Since -f implies -h, -h needs to be checked first.

Lin Jian 7712700b d4b7bd6f

Changed files
+9 -9
pkgs
development
libraries
+5 -5
pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
···
do
isELF "$file" || isMachO "$file" || continue
-
if [ -f "$file" ]
-
then
-
echo "wrapping $file"
-
wrapQtApp "$file"
-
elif [ -h "$file" ]
+
if [ -h "$file" ]
then
target="$(readlink -e "$file")"
echo "wrapping $file -> $target"
rm "$file"
makeQtWrapper "$target" "$file"
+
elif [ -f "$file" ]
+
then
+
echo "wrapping $file"
+
wrapQtApp "$file"
fi
done
done
+4 -4
pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh
···
[ -d "$targetDir" ] || continue
find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file; do
-
if [ -f "$file" ]; then
-
echo "wrapping $file"
-
wrapQtApp "$file"
-
elif [ -h "$file" ]; then
+
if [ -h "$file" ]; then
target="$(readlink -e "$file")"
echo "wrapping $file -> $target"
rm "$file"
makeQtWrapper "$target" "$file"
+
elif [ -f "$file" ]; then
+
echo "wrapping $file"
+
wrapQtApp "$file"
fi
done
done