added aliases and deploy function

This commit is contained in:
2026-03-05 00:46:52 +01:00
parent 1d8ec5e402
commit d689420388
2 changed files with 19 additions and 0 deletions

16
bashrc_overrides/deploy Normal file
View File

@@ -0,0 +1,16 @@
deploy() {
REPO_HOST="git.bjphoster.com/"
REPO_ORG="deployments"
DEPLOY_DIRECTORY="${DEPLOY_DIRECTORY:-/srv}"
SERVICE="$1"
if [ "$#" -lt 1 ]; then
echo "Usage: deploy <service> [service-name]"
return
fi
if [ "$#" -gt 1 ]; then
SERVICE_NAME="$2"
else
SERVICE_NAME="$SERVICE"
fi
git clone https://$REPO_HOST$REPO_ORG/$SERVICE $DEPLOY_DIRECTORY/$SERVICE_NAME
}