Skip to content

Instantly share code, notes, and snippets.

@kennethgillen
Last active August 29, 2015 13:57
Show Gist options
  • Save kennethgillen/9549629 to your computer and use it in GitHub Desktop.
Save kennethgillen/9549629 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -u
set -e
echorun() {
echo "$@"
"$@"
}
group() {
echorun omero group add --ignore-existing "$1" --type "$2"
}
user() {
NAME="$1"
FIRST="$2"
LAST="$3"
PASS="$4"
shift 4
echorun omero user add --ignore-existing -P "$PASS" "$NAME" "$FIRST" "$LAST" "$@"
}
for i in {1..3}
do
group searcher-`printf '%02d' $i` read-only
done
for i in {1..4}
do
user searcher-`printf '%02d' $i` searcher `printf '%02d' $i` ome searcher-01
done
group pychrm-1 read-only
group pychrm-2 read-only
group pychrm-3 read-only
user pychrm-1 pychrm 1 ome pychrm-1 pychrm-3
user pychrm-2 pychrm 2 ome pychrm-2 pychrm-3
group unittest private
user unittest unit test unittest unittest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment