wrapQtAppsHook: actually use makeQtWrapper for symlinks (#383082)

This commit is contained in:
K900
2025-02-19 12:18:05 +03:00
committed by GitHub
2 changed files with 9 additions and 9 deletions
@@ -87,16 +87,16 @@ wrapQtAppsHook() {
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
@@ -81,14 +81,14 @@ if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then
[ -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