summarylogtreecommitdiffstats
path: root/create_db.sh
diff options
context:
space:
mode:
Diffstat (limited to 'create_db.sh')
-rwxr-xr-xcreate_db.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/create_db.sh b/create_db.sh
new file mode 100755
index 000000000000..863f58f64569
--- /dev/null
+++ b/create_db.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+PREFIX="$1"
+
+CMD=$(cat <<EOF
+:ok = :mnesia.create_schema([node])
+:ok = :mnesia.start()
+{:atomic, :ok} = :mnesia.create_table(ContentLength, [attributes: [:path, :content_length],
+ disc_copies: [node]])
+EOF
+)
+ELIXIR_ERL_OPTIONS="-sname cpcache -mnesia dir '$PREFIX/var/cache/cpcache/mnesia'" /usr/bin/elixir -e "$CMD"