From f309f2abc358c57e623dd6ff226d7b6cb3937fd4 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 21 Sep 2026 22:19:05 -1000 Subject: Unify the docs, samples and extensions --- tools/gen-version.sh | 1 + tools/release-build.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/gen-version.sh b/tools/gen-version.sh index b28e987..ca8ea65 100755 --- a/tools/gen-version.sh +++ b/tools/gen-version.sh @@ -1,4 +1,5 @@ #!/bin/sh + # Writes a "CGIT_VERSION = ..." line into the output file, which the build # then includes. Run it from the project root, as gen-version.sh # [output], so that git describe reports cgit rather than the bundled git diff --git a/tools/release-build.sh b/tools/release-build.sh index babf008..a22b70e 100755 --- a/tools/release-build.sh +++ b/tools/release-build.sh @@ -1,4 +1,5 @@ #!/bin/sh + # Build cgit for a release with Linux hardening flags, which are ELF and GCC or # Clang specific. The flags add a stack protector, fortified libc calls, a # position independent executable, and full RELRO. By default Lua is pinned off @@ -8,7 +9,8 @@ set -eu -if [ "$#" -gt 1 ]; then +if test "$#" -gt 1 +then echo "usage: $0 [lua]" >&2 exit 2 fi @@ -71,4 +73,5 @@ CGIT_EXTRA_CFLAGS="-Wformat -Wformat-security -Werror=format-security" # flags, and cleanall rather than clean because only cleanall descends into # vendor/git. make cleanall -exec make "$@" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CGIT_EXTRA_CFLAGS="$CGIT_EXTRA_CFLAGS" +exec make "$@" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + CGIT_EXTRA_CFLAGS="$CGIT_EXTRA_CFLAGS" -- cgit v2.8.0