Skip to content

Commit

Permalink
gitops-install: make env file zsh compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
skrobul committed Sep 20, 2024
1 parent b411b5d commit 2f46cb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/deploy-guide/gitops-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ To avoid defining many environment variables we'll simplify by creating an
place it where we've cloned understack. A complete file would like like

```bash title="/path/to/uc-deploy/my-k3s.env"
UC_DEPLOY="$(cd "$(dirname ${BASH_SOURCE[0]})" && git rev-parse --show-toplevel)"
if [ -n "$BASH_SOURCE" ]; then # bash
UC_DEPLOY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && git rev-parse --show-toplevel)"
elif [ -n "$ZSH_VERSION" ]; then # zsh
UC_DEPLOY="$(cd "$(dirname "${(%):-%x}")" && git rev-parse --show-toplevel)"
fi
DEPLOY_NAME="my-k3s"
[email protected]:myorg/uc-deploy.git
UC_DEPLOY_SSH_FILE="$HOME/devel/uc-deploy-key"
Expand Down

0 comments on commit 2f46cb9

Please sign in to comment.