summaryrefslogtreecommitdiffstats
path: root/ll-store-binding/store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'll-store-binding/store.sh')
-rwxr-xr-xll-store-binding/store.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/ll-store-binding/store.sh b/ll-store-binding/store.sh
new file mode 100755
index 0000000..d2dfbc7
--- /dev/null
+++ b/ll-store-binding/store.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+case "$1" in
+ "get")
+ if [ "$#" -ne "4" ]; then
+ echo "Usage: store get <user> <app> <tag>"
+ exit 1
+ fi
+ curl -v "http://localhost:9001/api/ll-store/get?username=$2&appname=$3&tagname=$4&token="
+ ;;
+ "set")
+ if [ "$#" -ne "5" ]; then
+ echo "Usage: store get <user> <app> <tag> <value>"
+ exit 1
+ fi
+ curl -v "http://localhost:9001/api/ll-store/set?username=$2&appname=$3&tagname=$4&value=$5&token="
+ ;;
+ *)
+ echo "Usage: store <action> <user> <app> <tag> <value>"
+ echo " Action can be 'get' or 'set'."
+ ;;
+esac
+