mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
wrapQtAppsHook: actually use makeQtWrapper for symlinks
Since -f implies -h, -h needs to be checked first.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user