From: Paul Hänsch Date: Thu, 9 Jun 2022 13:24:25 +0000 (+0200) Subject: allow attachment revisioning X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=4bb6a2be511e608fa87fbb7b54d8ed275b844b30;p=shellwiki allow attachment revisioning --- 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