. "$_EXEC/db23.sh"
. "$_EXEC/form.sh"
+cd "$_DATA"
+
SESSION_COOKIE
_() { printf '%s\n' "$*"; }
. "$_EXEC/l10n.sh"
which git && [ ! -d .git ] && {
- git init
- mkdir -p documents/ export/
+ git -C "$_DATA" init
+ mkdir -p "$_DATA/documents/" "$_DATA/export/"
printf 'export/
-serverkey' >.gitignore
- git add documents/ .gitignore
- git commit -m 'initialisation of document repo'
+serverkey' >"$_DATA/.gitignore"
+ git -C "$_DATA" add documents/ .gitignore
+ git -C "$_DATA" commit -m 'initialisation of document repo'
} >&2
[ "$REQUEST_METHOD" = POST ] && case $(POST action) in