Skip to content

Commit 441671b

Browse files
committed
Simplified cfnl-set-path
1 parent b5b239d commit 441671b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,33 +91,28 @@ function cfnl-show() {
9191
echo "CFNL_PATH: ($CFNL_PATH)"
9292
}
9393
94-
function cfnl-set-vars() {
95-
cfnl_configs_path="$HOME/.cfnl"
96-
region=$1
97-
client=$2
98-
aws_account=$3
99-
aws_env=$4
100-
project=$5
94+
function cfnl-set-path() {
95+
cfnl_configs_path=$1
10196
102-
export CFNL_PATH="$cfnl_configs_path/$region/$client/$aws_account/$aws_env/$project"
97+
export CFNL_PATH="$cfnl_configs_path"
10398
cfnl-show
10499
}
105100
106101
# Default
107-
cfnl-set-vars uswest2 client01 account01 prd project01
102+
cfnl-set-path $HOME/.cfnl/uswest2/client1/account01/prd/project01
108103
109104
function cfc() {
110-
echo "Running (/usr/local/bin/cfnl -f ${CFNL_PATH}/${1}.yml)"
105+
echo "Running Create Stack (/usr/local/bin/cfnl -f ${CFNL_PATH}/${1}.yml)"
111106
/usr/local/bin/cfnl -f "$CFNL_PATH/$1.yml"
112107
}
113108
114109
function cfu() {
115-
echo "Running (/usr/local/bin/cfnl -u -f ${CFNL_PATH}/${1}.yml)"
110+
echo "Running Update Stack (/usr/local/bin/cfnl -u -f ${CFNL_PATH}/${1}.yml)"
116111
/usr/local/bin/cfnl -u -f "$CFNL_PATH/$1.yml"
117112
}
118113
119114
function cfd() {
120-
echo "Running (/usr/local/bin/cfnl -d -f ${CFNL_PATH}/${1}.yml)"
115+
echo "Running Delete Stack (/usr/local/bin/cfnl -d -f ${CFNL_PATH}/${1}.yml)"
121116
/usr/local/bin/cfnl -d -f "$CFNL_PATH/$1.yml"
122117
}
123118
```

0 commit comments

Comments
 (0)