From 912d8a509e76cecba06b0193750a09f9c8308b6f Mon Sep 17 00:00:00 2001 From: Al Berez Date: Sat, 24 Feb 2024 14:08:01 -0800 Subject: [PATCH] Add comments to scripts --- bin/shep_env | 12 ++++++++++++ bin/shep_select | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/bin/shep_env b/bin/shep_env index 92225fa..dc8fa61 100755 --- a/bin/shep_env +++ b/bin/shep_env @@ -5,6 +5,18 @@ export PS4=$'+ \e[0;40;36m${BASH_SOURCE}:${FUNCNAME[0]:+${FUNCNAME[0]}}:${LINENO ${DEBUG:+set -x} set -e +# +# There is a shortcut to target specific environment via `export SH_ID=` +# +# ``` +# SH_ID=205d4fca-66da-48c6-90ae-10a6f79610e1 SH_NS=aberezovsky shep_env +# ``` +# +# After this `bosh`, `credhub`, and `cf` commands will be targeted to selected shepherd environment. +# +# By default scripts use tas-devex namespace, but you can easially point to your personal namespace by `export SH_NS=` +# + export SH_NS=${SH_NS:-tas-devex} \ SH_ID=${SH_ID:---last-lease} diff --git a/bin/shep_select b/bin/shep_select index 272141c..e823a07 100755 --- a/bin/shep_select +++ b/bin/shep_select @@ -5,6 +5,21 @@ export PS4=$'+ \e[0;40;36m${BASH_SOURCE}:${FUNCNAME[0]:+${FUNCNAME[0]}}:${LINENO # env SHELLOPTS="${SHELLOPTS}:xtrace" shep_env set -e +# +# Script allow developer to list, select, and target TAS shepherd environments from the workstation +# By default scripts use tas-devex namespace, but you can easially point to your personal namespace by `export SH_NS=` +# +# ``` +# SH_NS=aberezovsky shep_env +# ``` +# +# You can pass environment filter options after `s` or `shep_select` command +# +# ``` +# shep_select APPSMAN-148 +# ``` +# + ${DEBUG:+set -x} export SH_NS="${SH_NS:-tas-devex}"