Skip to content

Commit

Permalink
Simplify relative symlink conversion
Browse files Browse the repository at this point in the history
The string manipulation can be done in pure sh, there is no need for
grep and sed.
  • Loading branch information
tom93 committed Jul 29, 2024
1 parent 0250eb2 commit cce4d1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ install-domserver:
# Now change all relative symlinks in webapp/public to their correct paths
for link in $$(find $(DESTDIR)$(domserver_webappdir)/public/$$dir -maxdepth 2 -type l); do \
target=$$(readlink $$link) ; \
if echo $${target} | grep -q '\.\./vendor' ; then \
case $${target} in *../vendor*) \
rm $$link ; \
realtarget=$(domserver_webappdir)/vendor$$(echo $${target} | sed 's!^.*\.\./vendor!!') ; \
realtarget=$(domserver_webappdir)/vendor$${target#*../vendor} ; \
ln -s $$realtarget $$link ; \
fi \
esac \
done
$(INSTALL_DATA) -t $(DESTDIR)$(domserver_webappdir) phpunit.xml.dist .env

Expand Down

0 comments on commit cce4d1b

Please sign in to comment.