diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 15:14:18 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-27 15:14:18 +0100 |
commit | 0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4 (patch) | |
tree | 7807b9d017e44bc522a75f40c7a4589d994455f8 /bin/appstore-add-app | |
parent | 5821a949035a5e098a2c6b395818f5efa1c66f8e (diff) | |
download | appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.gz appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.bz2 appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.tar.xz appstore-0d92ff5fd34d79b54c30c38ac41bc600acf7b7c4.zip |
o Dropping the CSV file for using a native app config file instead.
o Using apache as an example app.
o Adding appstore-add-app as a utility to register appliations.
Diffstat (limited to 'bin/appstore-add-app')
-rwxr-xr-x | bin/appstore-add-app | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/appstore-add-app b/bin/appstore-add-app new file mode 100755 index 0000000..c190efb --- /dev/null +++ b/bin/appstore-add-app @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e +set -u + +APPSTORE_HOME=$(cd $(dirname "$0")/.. && pwd) + +. $APPSTORE_HOME/lib/common +# HEADER END + +usage() { + echo "usage: $0 add-app [name] [resolver] [resolver args] [version] [state]" +} + +if [ $# -ne 5 ] +then + usage +fi + +name="$1" + +# Creating configuration file for the application +touch "$name".config +git add "$name".config + +app conf set -f appstore.config ${name}.resolver "$2" +app conf set -f appstore.config ${name}.resolver_args "$3" +app conf set -f appstore.config ${name}.version "$4" +app conf set -f appstore.config ${name}.state "$5" + +# Register the application +apps=$(app cat-conf -f appstore.config -k appstore.apps | cut -f 2- -d =) +app conf set -f appstore.config appstore.apps "$apps,$name" |