mirror of
https://github.com/openappsec/attachment.git
synced 2025-06-28 16:41:03 +03:00
Add error handling to nginx_version_configuration.sh
This commit is contained in:
parent
50b247e576
commit
486253b198
@ -25,10 +25,18 @@ mkdir -p ${BUILD_OUTPUT_DIR}
|
||||
cd ${BUILD_OUTPUT_DIR}
|
||||
|
||||
wget --no-check-certificate https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to download NGINX source code. Path used: 'https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar -xzvf nginx-${NGINX_VERSION}.tar.gz
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to untar NGINX source code. Tar file: 'nginx-${NGINX_VERSION}.tar.gz'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm nginx-${NGINX_VERSION}.tar.gz
|
||||
rm -f nginx-${NGINX_VERSION}.tar.gz
|
||||
|
||||
mv nginx-${NGINX_VERSION} nginx-src
|
||||
cd nginx-src
|
||||
@ -40,8 +48,16 @@ else
|
||||
echo "Nginx compiler already Configured...\n"
|
||||
fi
|
||||
|
||||
make && echo "${EXTRA_CC_OPT}" > cc_flags.mk
|
||||
if test ! -f configured.ok; then
|
||||
echo "Failed to configure NGINX source code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make && echo "${EXTRA_CC_OPT}" > cc_flags.mk
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to build NGINX source code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUT_FILE_NAME=include_paths.mk
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user