Skip to content

Commit

Permalink
clients/Makefile.am: dlname_filter(): use a shell function to avoid m…
Browse files Browse the repository at this point in the history
…ixing backticks and double-quotes (upsets ksh) [networkupstools#2431]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 15, 2024
1 parent 1d0a132 commit a39ecec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ endif
# libdir='//lib'
CLEANFILES += libupsclient-version.h
libupsclient-version.h: libupsclient.la
@SOFILE_LIBUPSCLIENT="`grep -E '^dlname' '$?' | sed -e 's/^[^=]*=//' -e 's/^\"\\(.*\\)\"/\\1/' -e 's/^'"'"'\\(.*\\)'"'"'/\\1/'`" \
@dlname_filter() { sed -e 's/^[^=]*=//' -e 's/^"\(.*\)"$$/\1/' -e 's/^'"'"'\(.*\)'"'"'$$/\1/' ; }; \
SOFILE_LIBUPSCLIENT="`grep -E '^dlname' '$?' | dlname_filter`" \
|| SOFILE_LIBUPSCLIENT="" ; \
if [ x"$${SOFILE_LIBUPSCLIENT-}" = x ] ; then \
printf "#ifdef SOFILE_LIBUPSCLIENT\n# undef SOFILE_LIBUPSCLIENT\n#endif\n\n" ; \
Expand Down

0 comments on commit a39ecec

Please sign in to comment.