|
@ -1,14 +1,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP_NAME=monujo |
|
|
APP_NAME=monujo |
|
|
VERSION=1.0.0-rc.3 |
|
|
|
|
|
SOURCE_URL="https://docker.0k.io/downloads/$APP_NAME-$VERSION.tar.bz2" |
|
|
|
|
|
|
|
|
SOURCE_URL="https://docker.0k.io/downloads" |
|
|
LOCATION="$SERVICE_CONFIGSTORE/opt/apps/$APP_NAME" |
|
|
LOCATION="$SERVICE_CONFIGSTORE/opt/apps/$APP_NAME" |
|
|
CONFIGFILE="$LOCATION/config.json" |
|
|
CONFIGFILE="$LOCATION/config.json" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
monujo:code_init() { |
|
|
monujo:code_init() { |
|
|
local version="$1" enforce_version="$2" |
|
|
|
|
|
|
|
|
local version="$1" enforce_version="$2" source_url |
|
|
if [ -e "$LOCATION/.version" ] && \ |
|
|
if [ -e "$LOCATION/.version" ] && \ |
|
|
[ "$(cat "$LOCATION/.version")" == "$version" ]; then |
|
|
[ "$(cat "$LOCATION/.version")" == "$version" ]; then |
|
|
return 0 |
|
|
return 0 |
|
@ -24,9 +23,10 @@ monujo:code_init() { |
|
|
mkdir -p "$LOCATION" |
|
|
mkdir -p "$LOCATION" |
|
|
fi |
|
|
fi |
|
|
cd "$LOCATION" |
|
|
cd "$LOCATION" |
|
|
info "Downloading '$SOURCE_URL'." |
|
|
|
|
|
wget -q "$SOURCE_URL" -O file.tar.bz2 || { |
|
|
|
|
|
err "Couldn't download '$SOURCE_URL'." |
|
|
|
|
|
|
|
|
source_url="$SOURCE_URL/$APP_NAME-$version.tar.bz2" |
|
|
|
|
|
info "Downloading '$source_url'." |
|
|
|
|
|
wget -q "$source_url" -O file.tar.bz2 || { |
|
|
|
|
|
err "Couldn't download '$source_url'." |
|
|
rm file.tar.bz2 |
|
|
rm file.tar.bz2 |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|