Created
December 6, 2016 13:02
-
-
Save kphrx/806b46791ffd53b4e8b149a431e325d0 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
CMDNAME=`basename $0` | |
while getopts v: OPT | |
do | |
case ${OPT} in | |
"v" ) FLR_v="TRUE" | |
NGXVER="${OPTARG}" | |
;; | |
* ) echo "Usage: $CMDNAME [-v <Nginx Version>]" 1>&2 | |
exit 1 | |
;; | |
done | |
if [ "$FLG_v" = "TRUE" ]; then | |
wget http://nginx.org/download/nginx-${NGXVER}.tar.gz | |
tar -xzvf nginx-${NGXVER}.tar.gz | |
else | |
echo "Usage: $CMDNAME [-v <Nginx Version>]" 1>&2 | |
exit 2 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment