mirror of
https://github.com/minoplhy/scriptbox.git
synced 2024-12-05 01:46:57 +00:00
nginx_build_script: add: options to change build tag in Nginx
This commit is contained in:
parent
341ad3317b
commit
42aab2a5d9
@ -21,6 +21,17 @@ while [ ${#} -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
--nginx-tag=* )
|
||||||
|
NGINX_TAG="${1#*=}"
|
||||||
|
case $NGINX_TAG in
|
||||||
|
"")
|
||||||
|
echo "ERROR: --nginx-tag= is empty!"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -49,7 +60,21 @@ mkdir $HOMEDIRECTORY && cd $HOMEDIRECTORY
|
|||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
cd $HOMEDIRECTORY
|
cd $HOMEDIRECTORY
|
||||||
hg clone -b default https://hg.nginx.org/nginx
|
hg clone https://hg.nginx.org/nginx $HOMEDIRECTORY/nginx
|
||||||
|
|
||||||
|
cd $HOMEDIRECTORY/nginx
|
||||||
|
# Check if the tag exists
|
||||||
|
if [[ -n $NGINX_TAG ]]
|
||||||
|
then
|
||||||
|
if hg tags | grep -q "^${NGINX_TAG}\>"; then
|
||||||
|
echo "INFO: Switching Nginx Branch to ${NGINX_TAG}"
|
||||||
|
hg checkout $NGINX_TAG
|
||||||
|
else
|
||||||
|
echo "ERROR: NGINX_TAG specified is not existed. aborting..." && exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
hg checkout default
|
||||||
|
fi
|
||||||
|
|
||||||
# Build SSL Library
|
# Build SSL Library
|
||||||
case $SSL_LIB in
|
case $SSL_LIB in
|
||||||
|
Loading…
Reference in New Issue
Block a user