From e1fbe0050ed31645e103f2b13a2f01e9c86f07b3 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sun, 8 Dec 2024 11:17:29 +0100 Subject: [PATCH] add if doc exists --- setup.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index cb7377c..ebaa66b 100644 --- a/setup.sh +++ b/setup.sh @@ -13,9 +13,18 @@ echo "3. The installer will install Docker and Docker Compose" apt install docker docker-compose -y echo "4. The installer will clone the Docker-Compose Repository" -mkdir /opt/odc && cd /opt/odc -git clone https://git.h2-invent.com/datenschutzcenter/docker-compose.git -cd docker-compose +HOME_DIR=/opt/odc +if [ -d $HOME_DIR/docker-compose ] +then + cd /$HOME_DIR/docker-compose + git add . + git stash + git pull +else + mkdir /opt/odc && cd /opt/odc + git clone https://git.h2-invent.com/datenschutzcenter/docker-compose.git + cd docker-compose +fi echo "5. The installer will setup all scripts, so you can docker-compose up" echo ""