2
usage "run" "Managing cluster runs" <<EOF
4
mkname Allocate a cluster run name/id/tag
5
create Create a cluster run directory
10
local op=${1:-list}; test $# -gt 0 && shift
14
(test -d "$global_runsdir" && cd "$global_runsdir" && find . -type d)
18
local usage="USAGE: wb run mkname BATCH-NAME PROFILE-NAME"
19
local batch=${1:?$usage}
20
local prof=${2:?$usage}
21
echo -n "$(date +'%Y'-'%m'-'%d'-'%H.%M').$batch.$prof"
25
local usage="USAGE: wb run create ??? BATCH-NAME PROFILE-NAME"
27
## - genesis has been created
28
## - the cluster is operating
29
local name=${1:?$usage}
30
local batch=${2:?$usage}
31
local prof=${3:?$usage}
33
local dir=$runsdir/$name
34
if test "$(realpath "$dir")" = test "$(realpath "$global_runsdir")" -o "$name" = '.'
35
then fatal "bad, bad tag '$name'"; fi
41
global_runsdir=$global_runsdir