summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-06-18 10:30:51 +0200
committerGitHub <noreply@github.com>2020-06-18 10:30:51 +0200
commit355d89863fc721f4024c516d2863a16d20540fdf (patch)
treed09edec73d65f81adfdb1139a46713f6c50ebe6a /Makefile
parentMerge pull request #23 from beziapp/dev (diff)
parentfixed help screens and notices for make generate != make install (diff)
downloadbeziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar.gz
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar.bz2
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar.lz
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar.xz
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.tar.zst
beziapp-355d89863fc721f4024c516d2863a16d20540fdf.zip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..911ebc9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+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 generate installs BežiApp to dist/"
+ @echo "no target specified, exiting ..."
+
+prepare:
+ #!/bin/bash
+ sudo apt install git -y
+ mkdir -p tmp
+ rm -rf tmp/bverbose
+ cd tmp && git clone https://github.com/sijanec/bverbose && cd bverbose && \
+ make prepare && make install
+ mv tmp/bverbose/bin/* bin/
+ rm -rf tmp/bverbose
+
+generate:
+ #!/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/
+