summarylogtreecommitdiffstats
path: root/create_db.sh
blob: 857cfe9d7d095baa83832525d7a0e6c1a6f7a897 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

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 '/var/cache/cpcache/mnesia'" /usr/bin/elixir -e "$CMD"