about summary refs log tree commit diff
path: root/tools/compile
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-14 22:07:42 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-14 22:07:42 +0100
commit33188b1a0246ae57fa478b501786cf292b4d1904 (patch)
tree9ae9785a04188a6f1628128fe5c8c3ca7a70480e /tools/compile
parent1de036cff919915636e8c64e61dacdea5629d281 (diff)
downloadkronika-33188b1a0246ae57fa478b501786cf292b4d1904.tar.gz
kronika-33188b1a0246ae57fa478b501786cf292b4d1904.zip
Add compile tool
Diffstat (limited to 'tools/compile')
-rwxr-xr-xtools/compile29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/compile b/tools/compile
new file mode 100755
index 0000000..b28d1ea
--- /dev/null
+++ b/tools/compile
@@ -0,0 +1,29 @@
+#!/bin/sh
+## Automated script for compiling lowdown
+
+# node_modules is cached by netlify
+mkdir -p node_modules
+
+## lowdown
+if [ ! -f node_modules/lowdown ]; then
+  wget https://kristaps.bsd.lv/lowdown/snapshots/lowdown.tar.gz
+  tar xf lowdown.tar.gz
+  cd lowdown-*
+  ./configure
+  make
+  cp lowdown ../node_modules
+  cd ..
+fi
+
+
+## cpio
+if [ ! -f node_modules/cpio ]; then
+  wget https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.gz
+  tar xf cpio-2.13.tar.gz
+  cd cpio-2.13
+  ./configure --prefix=$PWD/out
+  make
+  make install
+  cp -r out ../node_modules/cpio_src
+  ln -s ../node_modules/cpio ../node_modules/cpio_src/bin/cpio
+fi