-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gitops-install: make env file zsh compatible
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|