Skip to content
Snippets Groups Projects
Unverified Commit 589e0723 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

updated makefile to get yq

parent 0048ba4e
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ markdown: $(MARKDOWN) ...@@ -26,7 +26,7 @@ markdown: $(MARKDOWN)
%.html: %.md metadata.yaml %.html: %.md metadata.yaml
pandoc -s $(OPTIONS) $(REVEALOPTIONS) -o $@ $^ pandoc -s $(OPTIONS) $(REVEALOPTIONS) -o $@ $^
%.markdown: %.md metadata.yaml %.markdown: %.md metadata.yaml yq
sed '1 { /^---/ { :a N; /\n---/! ba; d} }' $< > no_header sed '1 { /^---/ { :a N; /\n---/! ba; d} }' $< > no_header
grep -v -F -x -f no_header $< > header.yaml grep -v -F -x -f no_header $< > header.yaml
echo "---" > tmp.yaml echo "---" > tmp.yaml
...@@ -34,7 +34,9 @@ markdown: $(MARKDOWN) ...@@ -34,7 +34,9 @@ markdown: $(MARKDOWN)
cat tmp.yaml no_header > $@ cat tmp.yaml no_header > $@
rm no_header header.yaml tmp.yaml rm no_header header.yaml tmp.yaml
yq:
wget -nc https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64
chmod "u+x" yq_linux_amd64
deploy: all deploy: all
mkdir -p prog_seq_c_cours mkdir -p prog_seq_c_cours
...@@ -42,4 +44,4 @@ deploy: all ...@@ -42,4 +44,4 @@ deploy: all
cp *.html prog_seq_c_cours cp *.html prog_seq_c_cours
clean: clean:
rm -f *.pdf *.html *.markdown rm -f *.pdf *.html *.markdown yq_linux_amd64*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment