Skip to content

Commit e9043b4

Browse files
Implemented absoulte symlink, simplified code and review changes.
1 parent 6264835 commit e9043b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

brew.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ pipeline:
5858
# Relocate .pc files to /usr/lib/pkgconfig and create symlinks
5959
mkdir -p ${{targets.destdir}}/usr/lib/pkgconfig/
6060
find ${{targets.destdir}}/home/linuxbrew -name "*.pc" | while read pc_file; do
61-
mkdir -p "$(dirname "$pc_file")" && mv "$pc_file" "${{targets.destdir}}/usr/lib/pkgconfig/$(basename "$pc_file")" && ln -s "../../../../../usr/lib/pkgconfig/$(basename "$pc_file")" "$pc_file"
61+
if [ ! -L "$pc_file" ]; then
62+
mv "$pc_file" "${{targets.destdir}}/usr/lib/pkgconfig/$(basename "$pc_file")"
63+
ln -s "${{targets.destdir}}/usr/lib/pkgconfig/$(basename "$pc_file")" "$pc_file"
64+
fi
6265
done
6366
6467
# Create profile.d script

0 commit comments

Comments
 (0)