Skip to content

Commit

Permalink
fixing to shell script to accept environment optarg
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaucier-sf committed Jan 4, 2024
1 parent 326dde9 commit e06fe27
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/action-init-plan-apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ INIT=false
PLAN=false
APPLY=false

while getopts "hip:a:z:" option; do
while getopts "hi:p:a:z:" option; do
case $option in
h) #show help
help
Expand All @@ -23,9 +23,6 @@ while getopts "hip:a:z:" option; do
export ENV=$OPTARG
APPLY=true
;;
d) #set directory
DIRECTORY=$OPTARG
;;
z) #pass extra arguments
EXTRA_ARGS=$OPTARG
;;
Expand All @@ -50,7 +47,7 @@ help () {
printf "Script to run terraform actions in github actions. Source this with arguments\n"

printf "\n"
printf "Syntax: [-h|i|p|a|d|z]\n"
printf "Syntax: [-h|i|p|a|z]\n"
printf "options:\n"
printf "h Print this help menu.\n"
printf "i run terraform init\n"
Expand Down

0 comments on commit e06fe27

Please sign in to comment.