#!/bin/bash CODE=https://git.xo.nl/marcel/deploy/raw/branch/master SECRET=https://git.xo.nl/marcel/secrets/raw/branch/main GREEN='\033[0;32m' RED='\033[0;31m' NOCOL='\033[0m' case $1 in install) echo -e "${GREEN}Starting installation of $2${NOCOL}" sleep 2 bash -c "$(curl -fsSL $CODE/$2/install.sh)" exit 0;; setup) echo -n "Git username: " read USER echo -n "Git password: " read -s PASS echo echo -e "${GREEN}Starting setup of $2${NOCOL}" sleep 2 curl -u $USER:$PASS -so /tmp/setup.env $SECRET/$2/setup.env bash -c "$(curl -fsSL $CODE/$2/setup.sh)" rm -f /tmp/setup.env exit 0;; *) echo -r "${RED}application name not entered, exitting${NOCOL}" exit 1;; esac exit 0