diff --git a/auto.sh b/auto.sh index 0753089..4ebf209 100755 --- a/auto.sh +++ b/auto.sh @@ -3,6 +3,11 @@ ### Read config . ./config.inc +### If the value is incorrect, convert to normal data. +if [ ! "$SERVER_HEADER" ]; then SERVER_HEADER="hakase"; fi +if [ "$BITCHK" != 32 ] && [ "$BITCHK" != 64 ]; then BITCHK=32; fi +if [ ! "$BUILD_MTS" ]; then BUILD_MTS="-j2"; fi + ### Remove Old file rm -f /usr/sbin/nginx.old @@ -19,7 +24,7 @@ if [ ! -f "lib/pcre/configure" ]; then fi ### ZLIB reconf -if [ "$BITCHK" = "64" ]; then +if [ "$BITCHK" = 64 ]; then if [ ! -f "lib/zlib/Makefile" ]; then cd lib/zlib ./configure @@ -44,16 +49,14 @@ if [ ! -d "lib/pagespeed" ] && [ "$PAGESPEED" = 1 ]; then cd incubator-pagespeed-ngx-1.13.35.2-stable ### Download psol - wget -c https://dl.google.com/dl/page-speed/psol/1.13.35.2-x64.tar.gz - tar -xzvf 1.13.35.2-x64.tar.gz - rm -f 1.13.35.2-x64.tar.gz + curl "$(scripts/format_binary_url.sh PSOL_BINARY_URL)" | tar xz cd .. mv incubator-pagespeed-ngx-1.13.35.2-stable pagespeed cd .. fi ### x86, x64 Check (Configuration) -if [ "$BITCHK" = "64" ]; then +if [ "$BITCHK" = 64 ]; then BUILD_BIT="-m64 " BUILD_OPENSSL="enable-ec_nistp_64_gcc_128 " BUILD_ZLIB="./lib/zlib" diff --git a/config.inc b/config.inc index cc99e93..e395501 100644 --- a/config.inc +++ b/config.inc @@ -1,3 +1,5 @@ +#!/bin/sh + ### Please install library. ### CentOS / Red Hat - yum install jemalloc-devel libuuid-devel libatomic expat-devel unzip autoconf automake libtool ### Ubuntu / Debian - apt install libjemalloc-dev uuid-dev libatomic1 libatomic-ops-dev expat unzip autoconf automake libtool @@ -15,7 +17,7 @@ SERVER_HEADER="hakase" ### (Comment out existing sources.) ### Do not modify it under normal circumstances. BITCHK=`getconf LONG_BIT` -#BITCHK="32" +#BITCHK=32 ### Multithread build ### Do not modify it under normal circumstances.