From b22ee58a165a98a624bafc17280c647718f663a2 Mon Sep 17 00:00:00 2001 From: Issam Maghni Date: Tue, 23 Jul 2019 01:23:33 -0400 Subject: [PATCH] script: lowercase uname --- .travis.yml | 2 +- nginx-zero | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc58919..147d4a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ deploy: provider: releases api_key: secure: HhJjsCMB+fb6FSovotxE0vkfU1aYdgS1+HlB08TXb6GVCKQ0fMUlKp2tyFNZQ+BH3b4CIze3nM6FcD08uM5EUGN+RgpkxWaCNtROu10V2ZR/IzaJ6dhOmV05AQEvruW2Zwval/3ArvgK06RL162MPJxg7irrv1yeQLxgH4QOY+Y30TddYnn+4WaioGuft/P1HG94hX6xx+pRei/XZPv6ijLbmYClfQ66ugA5bnRDGlLR0BjMOj/pKDFgmRIiJHs5eNGdox9+Gpk86AyhaWJgxQA1nVmmhKBl9okTd8eZ50Z6h+XOb76znXDEsnHiTsYL/f6Y1FL1WU9OF43Q+DTXW7YT2dpJABiXu3xCuQoGSXOKE8yDgJQCz84iSOrQ3VoGbl0Ipedr3BhF57uMojGvUFISqVUnMDBZOGnFCReoNRRbs8Zv+ORz+ZGAU+YnGmIE2ToOcjV3VvBggMjKrm7S9OsUJeM7vuytPx8v91OLFWrbIvRn0ElIdIJ43e2tH3iosuX/i9BaVZ5g9hiFWZXFw9JSUDwJ1UObsD7AkzN/wuDRC5FWpN3SPiT/OhuDVEV6roNMlO/SK1c1FFZMJQHAxFi5uH7rEIsZmjG+Qn48uuSDEXegDCot8PlLjZzJwdYl/DjI82cI70+ORtPc4e0Z7GaDM8TPUBzv9s4FCxmzXzQ= - file: nginx.tar.gz + file: linux.tar.gz skip_cleanup: true on: tags: true diff --git a/nginx-zero b/nginx-zero index 4b8baab..8b1e3fd 100755 --- a/nginx-zero +++ b/nginx-zero @@ -4,10 +4,10 @@ set -xe -UNAME=`uname -s` -[ $UNAME = Linux ] && SU="sudo env PATH=$PATH" MAKE=make || SU=doas MAKE=gmake +UNAME=$(uname -s | tr '[:upper:]' '[:lower:]') +[ $UNAME = linux ] && SU="sudo env PATH=$PATH" MAKE=make || SU=doas MAKE=gmake command -v nproc && NPROC=`nproc` || NPROC=`sysctl -n hw.ncpu` -for p in tar gzip cmake patch $MAKE # uname nproc (coreutils) +for p in tar gzip cmake patch $MAKE do ! command -v $p && echo Command \`$p\` missing && false done @@ -56,7 +56,7 @@ cd musl find ../../musl/* -exec patch -Np1 -i{} \; cd - -if [ $UNAME = Linux ]; then +if [ $UNAME = linux ]; then # Gathering all the dependencies # EPOLLEXCLUSIVE not available : Linux4.5 / glibc2.24 # reuseport is available : Linux3.9+ @@ -128,7 +128,7 @@ cd - # NGINX cd nginx -[ $UNAME = OpenBSD ] || NGX_FIO=--with-file-aio +[ $UNAME = openbsd ] || NGX_FIO=--with-file-aio auto/configure $LIBATOMIC $NGX_FIO \ --prefix=/opt/nginx \ --pid-path=/run/nginx.pid \ @@ -187,4 +187,4 @@ cd - command -v ldd && ldd /opt/nginx/bin/nginx ||: # Avoid replacing user’s config file on extraction (but keep nginx.conf.default) $SU rm /opt/nginx/conf/nginx.conf -tar czf $_root/nginx.tar.gz -C /opt nginx +tar czf $_root/$UNAME.tar.gz -C /opt nginx