. "${_EXEC}/tools.sh"
. "${_EXEC}/acl.sh"
+REV_ATTACHMENTS=${REV_ATTACHMENTS:-false}
WIKI_THEME="${WIKI_THEME:-default}"
. "${_EXEC}/themes/${WIKI_THEME}.sh"
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