-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdat.sh
executable file
·38 lines (36 loc) · 956 Bytes
/
dat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
dat=./`basename "$0"`
case $1 in
add)
case $2 in
types)
cd ../eic-registry/src/main/resources/resourceTypes
./loadResourceTypes.sh localhost
./beep.sh "Finished adding types"
;;
resources)
cd ../eic-data
./loadResources.sh localhost
./beep.sh "Finished adding resources"
;;
*)
${dat} add types
${dat} add resources
;;
esac
;;
del)
case $2 in
types)
curl -X "DELETE" http://localhost:9222/resourceTypes
;;
resources)
psql -hlocalhost -Uvrasidas registry -c 'drop owned by vrasidas cascade;'
;;
*)
${dat} del types
${dat} del resources
;;
esac
;;
esac