|
@ -8,19 +8,23 @@ CONFIGFILE="$LOCATION/config.json" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
monujo:code_init() { |
|
|
monujo:code_init() { |
|
|
mkdir -p "$LOCATION" |
|
|
|
|
|
if dir_is_empty "$LOCATION"; then |
|
|
|
|
|
cd "$LOCATION" |
|
|
|
|
|
info "First install, downloading '$SOURCE_URL'." |
|
|
|
|
|
wget -q "$SOURCE_URL" -O file.tar.bz2 || { |
|
|
|
|
|
err "Couldn't download '$SOURCE_URL'." |
|
|
|
|
|
rm file.tar.bz2 |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
tar xjf file.tar.bz2 && |
|
|
|
|
|
rm file.tar.bz2 && |
|
|
|
|
|
chown root:root "$LOCATION" -R |
|
|
|
|
|
|
|
|
if [ -e "$LOCATION/.version" ] && \ |
|
|
|
|
|
[ "$(cat "$LOCATION/.version")" == "$VERSION" ]; then |
|
|
|
|
|
return 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
[ -d "$LOCATION" ] && rm -rf "$LOCATION" |
|
|
|
|
|
mkdir -p "$LOCATION" |
|
|
|
|
|
cd "$LOCATION" |
|
|
|
|
|
info "Downloading '$SOURCE_URL'." |
|
|
|
|
|
wget -q "$SOURCE_URL" -O file.tar.bz2 || { |
|
|
|
|
|
err "Couldn't download '$SOURCE_URL'." |
|
|
|
|
|
rm file.tar.bz2 |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
tar xjf file.tar.bz2 && |
|
|
|
|
|
rm file.tar.bz2 && |
|
|
|
|
|
chown root:root "$LOCATION" -R && |
|
|
|
|
|
echo "$VERSION" > "$LOCATION/.version" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export MONUJO_OPTIONS=( |
|
|
export MONUJO_OPTIONS=( |
|
|