From fc07fb7278755fbf216a4fbb517eb90ad4f57751 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 1 Dec 2023 13:00:17 +0100 Subject: [PATCH] use _data dir --- datetime.sh | 0 doclist.sh | 0 index.cgi | 12 +++++++----- l10n.sh | 0 4 files changed, 7 insertions(+), 5 deletions(-) mode change 100644 => 100755 datetime.sh mode change 100644 => 100755 doclist.sh mode change 100644 => 100755 l10n.sh diff --git a/datetime.sh b/datetime.sh old mode 100644 new mode 100755 diff --git a/doclist.sh b/doclist.sh old mode 100644 new mode 100755 diff --git a/index.cgi b/index.cgi index f2feca3..dcfe98a 100755 --- a/index.cgi +++ b/index.cgi @@ -10,18 +10,20 @@ _EXEC="$(realpath "${0%/*}")" . "$_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 diff --git a/l10n.sh b/l10n.sh old mode 100644 new mode 100755 -- 2.39.5