mirror of
https://gitlab.com/Bockiii/deemix-docker.git
synced 2024-08-30 17:32:18 +00:00
22 lines
708 B
Plaintext
22 lines
708 B
Plaintext
#!/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://codeberg.org/RemixDev/deemix-pyweb.git deemix
|
|
touch /deemix/updated
|
|
else
|
|
cd /deemix
|
|
localv=$(git rev-parse HEAD)
|
|
remotev=$(git ls-remote https://codeberg.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 |