Skip to content

Instantly share code, notes, and snippets.

@newsomc
Created August 27, 2014 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newsomc/d7d9a550204976e9ed1a to your computer and use it in GitHub Desktop.
Save newsomc/d7d9a550204976e9ed1a to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -z $1 ]]; then
branch='test'
else
case $1 in
-b | --branch)
branch=$2
;;
--branch=*)
branch=${1#*=}
;;
esac
fi
if [[ -z $3 ]]; then
env='dev'
else
case $3 in
-e | --env)
env=$4
;;
--env=*)
env=${3#*=}
;;
esac
fi
echo "Testing: ", $1, $2, $3, $4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment