From d4f06b7846db8745c696fc1a38e1ffac9b462f1c Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sat, 25 Apr 2015 06:04:25 +0200 Subject: [docker] Change order of arguments to start.sh. NOTE: This is an incompatible change. Second argument, after role, is now the database path for merge. Erlang base dir is now the third argument --- packaging/docker/catlfish-dev/start.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'packaging/docker/catlfish-dev') diff --git a/packaging/docker/catlfish-dev/start.sh b/packaging/docker/catlfish-dev/start.sh index b37c829..904ea10 100755 --- a/packaging/docker/catlfish-dev/start.sh +++ b/packaging/docker/catlfish-dev/start.sh @@ -1,11 +1,12 @@ #! /bin/sh role=$1; [ -n "$1" ] && shift -erlbase=$1; [ -n "$1" ] && shift database=$1; [ -n "$1" ] && shift +erlbase=$1; [ -n "$1" ] && shift -[ -z "$erlbase" ] && erlbase=/usr/local/catlfish +# Set sane defaults. [ -z "$database" ] && database=/var/db/catlfish-merge +[ -z "$erlbase" ] && erlbase=/usr/local/catlfish case $role in frontend|storage|signing) @@ -15,11 +16,17 @@ case $role in "exec $erlbase/bin/erl -config catlfish" ;; merge) - ERL_LIBS=$erlbase/lib/catlfish-0.6.0.ez/catlfish-0.6.0 + # Catlfish version is included in filename of archive and + # filename in that archive. Example: lib/catlfish-0.6.0.ez + # contains catlfish-0.6.0. + ver=$(ls $erlbase/lib/catlfish-*.ez | sed 's/.*-\(.*\)\.ez/\1/1') + ERL_LIBS=$erlbase/lib/catlfish-${ver}.ez/catlfish-${ver} ERL_LIBS=$ERL_LIBS:$erlbase/lib/lager-2.1.1.ez/lager-2.1.1 export ERL_LIBS + $erlbase/merge.sh 60 3600 $database > merge_log/stdout 2> merge_log/stderr ;; *) echo "catlfish: unknown role: $role" + ;; esac -- cgit v1.1