From 4bb6a2be511e608fa87fbb7b54d8ed275b844b30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 9 Jun 2022 15:24:25 +0200 Subject: [PATCH] allow attachment revisioning --- index.cgi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.cgi b/index.cgi index 091254c..db4d749 100755 --- a/index.cgi +++ b/index.cgi @@ -6,6 +6,7 @@ . "${_EXEC}/tools.sh" . "${_EXEC}/acl.sh" +REV_ATTACHMENTS=${REV_ATTACHMENTS:-false} WIKI_THEME="${WIKI_THEME:-default}" . "${_EXEC}/themes/${WIKI_THEME}.sh" @@ -26,11 +27,11 @@ if [ "$(which git)" -a ! -f "$_DATA/.gitignore" ]; then cat >"$_DATA/.gitignore" <<-EOF users.db serverkey - */#attachments/ - */#cache/ - */#page.lock - */#page.*.cache - */#page.*.cache.* + $([ "$REV_ATTACHMENTS" = true ] || printf %s "**/#attachments/") + **/#cache/ + **/#page.lock + **/#page.*.cache + **/#page.*.cache.* EOF git init "$_DATA" git -C "$_DATA" add .gitignore -- 2.39.2