Last active
May 31, 2019 22:01
-
-
Save telmotrooper/d80337feb3cc57b72950d1befd35dcfc to your computer and use it in GitHub Desktop.
POSIX-compliant deploy function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deploy { | |
deploy_dir=/home/telmo/Development/deploy-scripts | |
if [ $1 = "frontend" ] || [ $1 = "front" ] || [ $1 = "f" ]; then | |
sh "$deploy_dir/deploy_frontend.sh" | |
elif [ $1 = "backend" ] || [ $1 = "back" ] || [ $1 = "b" ]; then | |
sh "$deploy_dir/deploy_backend.sh" | |
else | |
(>&2 echo "ERROR: \"$1\" doesn't match any known parameter.") | |
return 1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment