Skip to content

Commit

Permalink
Adapted to bash if-syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
schuur committed Nov 14, 2024
1 parent 7e70161 commit bf6f4e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ build/%.html: spec/%.bs
bikeshed --allow-nonlocal-files spec $< $@

@echo Set the status in the document
@if [ "$(status)"=="Release" ]; then \

@if [ '$(status)' == 'Release' ]; then \
echo "Release: add version to title"; \
mv -f $@ [email protected]; \
sed 's/<title>\(.*\)<\/title>/<title>\1 (Version $(version))<\/title>/g' [email protected] > $@; \
mv -f $@ [email protected]; \
sed 's/\(<h1 .*id="title">.*\)\(<\/h1>\)/\1 (Version $(version))\2/g' [email protected] > $@; \
elif [ "$(status)" == "Draft" || "$(status)" == "Consultation" ]; then \
elif [ '$(status)' == 'Draft' ] || [ '$(status)' == 'Consultation' ]; then \
echo "No release: add version-date to title"; \
mv -f $@ [email protected]; \
sed 's/<title>\(.*\)<\/title>/<title>\1 (Version $(version)-$(date))<\/title>/g' [email protected] > $@; \
Expand Down

0 comments on commit bf6f4e6

Please sign in to comment.