From 595fbc514d410ccdd46a81b8736d3711ac1ca7fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 15 Jul 2018 16:04:23 +0200 Subject: [PATCH] include guards for function libraries --- file.sh | 3 +++ storage.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/file.sh b/file.sh index 9f734c1..06f28d0 100755 --- a/file.sh +++ b/file.sh @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Affero General Public License # along with cgilite. If not, see . +[ -n "$include_fileserve" ] && return 0 +include_fileserve="$0" + file_type(){ case ${1##*.} in html|html) printf 'text/html';; diff --git a/storage.sh b/storage.sh index d4fbca3..1d8764b 100755 --- a/storage.sh +++ b/storage.sh @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Affero General Public License # along with CGIlite. If not, see . +[ -n "$include_storage" ] && return 0 +include_storage="$0" + LOCK(){ lock="${1}.lock" timeout="${2-20}" -- 2.39.2