You've already forked personal-linux-config
added aliases and deploy function
This commit is contained in:
16
bashrc_overrides/deploy
Normal file
16
bashrc_overrides/deploy
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user