#!/usr/bin/with-contenv bash # download and unpack echo "[cont-init.d] Downloading and unpacking" if [ ! -f "/deemix/server.py" ]; then echo "[cont-init.d] First start, cloning repo" git clone --recurse-submodules https://notabug.org/RemixDev/deemix-pyweb.git deemix touch /deemix/updated else cd /deemix localv=$(git rev-parse HEAD) remotev=$(git ls-remote https://notabug.org/RemixDev/deemix-pyweb.git refs/heads/master | cut -c1-40) if [ $localv = $remotev ]; then echo -e "[cont-init.d] Latest Version. No update needed" else echo -e "[cont-init.d] Newer Version. Updating" git pull --recurse-submodules touch /deemix/updated fi fi