#!/bin/bash IMAGE="registry.mgrote.net/ansible-devspace:latest" # Farben # https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux RESET='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' echo -e "${GREEN}Run checks...${RESET}" # TODO hier noch check output mit Haken dran in grĂ¼n if ! [ -f "./vault-pass" ]; then echo -e "${RED}Vault-Pass File is missing!${RESET}" exit 1 fi if ! [ -f "./id_ed25519" ]; then echo -e "${RED}SSH-Private-Key is missing!${RESET}" exit 1 fi docker pull --quiet ${IMAGE} docker run -it \ -v $PWD:/ansible-homeserver \ -w /ansible-homeserver ${IMAGE} \ /bin/bash -c "git config --global --add safe.directory /ansible-homeserver && source /usr/lib/git-core/git-sh-prompt && /bin/bash" # explizites sourc notwendig, Pfad kann mit "dpkg-query -L git | grep pro" gefunden werden # todo shellcheck