#!/usr/bin/env bash

GIT_URL="https://git.banananet.work/zocker/imageviewer.git"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )";
source "$DIR/_common.sh";

echo "Lade Updates herunter ..."
dir="$(mktemp -d)";
if ! git clone --depth 1 "$GIT_URL" "$dir"; then
    setup_failed;
    exit 1;
fi
rm -rf "$DIR.old";
mv "$DIR" "$DIR.old";
cp -r "$dir/playbook" "$DIR";
/bin/bash $DIR/execute.sh;
exit 1;
