mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
This commit makes it possible to build ModSecurity on systems where /bin/sh is a POSIX-compliant shell that is not Bash. Debian, Alpine Linux, and Gentoo Linux with the system shell set to not Bash, are examples of such systems. Previously, the helper macros contained two types of Bashisms: * The '==' comparison operator. Very easy to change, as the proper POSIX-compliant form is '='. For example: if test "${var}" == "myvalue" -> if test "${var}" = "myvalue" * The '-a' (and) operator in the 'test' builtin. The '-a' and '-o' operators were removed in POSIX 2024 (Issue 8). The correct form is to use the '&&' and '||' operators respectively. For instance: if test -d "${var}" -a -r "${var}/file" -> if test -d "${var}" && test -r "${var}/file" Bug: https://bugs.gentoo.org/887135 Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
22 lines
399 B
Bash
Executable File
22 lines
399 B
Bash
Executable File
#!/bin/sh
|
|
|
|
git clean -xfdi
|
|
git submodule foreach --recursive git clean -xfdi
|
|
|
|
VERSION=$(git describe --tags)
|
|
DIR_NAME="modsecurity-$VERSION"
|
|
TAR_NAME="modsecurity-$VERSION.tar.gz"
|
|
|
|
MY_DIR=${PWD##*/}
|
|
./build.sh
|
|
|
|
cd ..
|
|
tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git $MY_DIR
|
|
|
|
sha256sum $TAR_NAME > $TAR_NAME.sha256
|
|
gpg --detach-sign -a $TAR_NAME
|
|
|
|
cd -
|
|
echo $TAR_NAME ": done."
|
|
|