File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,22 @@ ENVIRONMENT=$1
31
31
32
32
info " Selected environment: $ENVIRONMENT "
33
33
34
- if [[ $( ls $ENVIRONMENTS_DIR /$ENVIRONMENT -* ) ]]; then
35
- warn " Configuration files for the environment $ENVIRONMENT already exist. Nothing to do."
34
+ if [[ $( ls $ENVIRONMENTS_DIR /$ENVIRONMENT -* 2> /dev/null ) ]]; then
35
+ warn " Configuration files for the environment $ENVIRONMENT already exist in $ENVIRONMENTS_DIR . Nothing to do."
36
36
exit 0
37
37
fi
38
38
39
39
info " Creating environment files"
40
- cp " $ENVIRONMENTS_DIR /demo-variables.sh" " $ENVIRONMENTS_DIR /$ENVIRONMENT -variables.sh"
40
+ VARIABLES_FILE=" $ENVIRONMENTS_DIR /$ENVIRONMENT -variables.sh"
41
+ CFN_CREATE_FILE=" $ENVIRONMENTS_DIR /$ENVIRONMENT -cfn-create-args.yaml"
42
+ CFN_UPDATE_FILE=" $ENVIRONMENTS_DIR /$ENVIRONMENT -cfn-update-args.yaml"
43
+ cp " $ENVIRONMENTS_DIR /demo-variables.sh" " $VARIABLES_FILE "
41
44
chmod +x " $ENVIRONMENTS_DIR /$ENVIRONMENT -variables.sh"
42
- cp " $ENVIRONMENTS_DIR /demo-cfn-update-args.yaml" " $ENVIRONMENTS_DIR /$ENVIRONMENT -cfn-create-args.sh"
43
- cp " $ENVIRONMENTS_DIR /demo-cfn-update-args.yaml" " $ENVIRONMENTS_DIR /$ENVIRONMENT -cfn-update-args.sh"
44
-
45
- info " Environment files created! Check out $ENVIRONMENTS_DIR "
45
+ cp " $ENVIRONMENTS_DIR /demo-cfn-create-args.yaml" " $CFN_CREATE_FILE "
46
+ cp " $ENVIRONMENTS_DIR /demo-cfn-update-args.yaml" " $CFN_UPDATE_FILE "
47
+
48
+ info " Environment files created! Check them out and adapt with your values:
49
+ * $VARIABLES_FILE
50
+ * $CFN_CREATE_FILE
51
+ * $CFN_UPDATE_FILE
52
+ "
You can’t perform that action at this time.
0 commit comments