I am trying to write a small shell script that will take user input on SVN branch and validate that
the requested branch exists in SVN. And then continue with other operations if the branch is valid.
I tried the following but seems its not working right:
VALID_BRANCHES="4.2.1 4.1.0 4.3.1 4.2.2" for brnache in $VALID_BRANCHES do echo "Checking if $brnache is a valid branch in SVN" if [ "$1" != "$brnache" ]; then echo "it isn't" continue else echo "$1 is a valid branch" break fi done