From 8154fb27f7156116d39e3658a0b9abeb9d502c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 9 Jun 2020 18:03:06 +0200 Subject: wdyt about Makefiles? --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..141eca1 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +default: + @echo "*** BežiApp Makefile ***" + @echo "targets:" + @echo " make prepare installs dependencies, cleans after itself, requires sudo permissions and debian/ubuntu for apt" + @echo " make install installs BežiApp to dist/" + @echo "no target specified, exiting ..." + +prepare: + #!/bin/bash + sudo apt install git + mkdir tmp + cd tmp + rm -rf bverbose + git clone https://github.com/sijanec/bverbose + cd bverbose + make prepare + make install + mv bin ../../bin + cd .. + rm -rf bverbose + cd .. + +install: + #!/bin/bash + ./bin/bvr-compose-html assets/pages-src/ dist/pages/ .html + cp -r assets/css dist/ + cp -r assets/fonts dist/ + cp -r assets/img dist/ + find assets/root/ -type f \( ! -name "*.bvr" \) -exec cp -r "{}" dist/ \; + find assets/root/ -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/\${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/root/\$FILE\" \"\$FILE_DST\"" + + # js bvr fajli + mkdir -p dist/js + # js ne znam te magije + find assets/js/ -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/js/\$FILE\" \"\$FILE_DST\"" + find assets/js/ -name "*.js" -printf "%P\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\${FILE/.bvr/}"; ./bin/bvr-jsmin assets/js/\"\$FILE\" \"\$FILE_DST\"" + + cp -r assets/root/.well-known dist/ + -- cgit v1.2.3