From: Paul Hänsch Date: Thu, 19 May 2022 14:39:35 +0000 (+0200) Subject: include guards X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2afc48aa56da563dd73ffb4bfa98fcd5776ef63f;p=shellwiki include guards --- diff --git a/acl.sh b/acl.sh index d232ea0..0ba6663 100755 --- a/acl.sh +++ b/acl.sh @@ -1,5 +1,8 @@ #!/bin/sh +[ "$include_acl" ] && return 0 +include_acl="$0" + # ACL_OVERRIDE="${ACL_OVERRIDE:-Admin:read,write}" ACL_DEFAULT="${ACL_DEFAULT:-Known:read,write${BR}All:read}" diff --git a/session_lock.sh b/session_lock.sh index f55c9cd..21c9808 100755 --- a/session_lock.sh +++ b/session_lock.sh @@ -1,5 +1,8 @@ #!/bin/sh +[ "$include_sessionlock" ] && return 0 +include_sessionlock="$0" + . "$_EXEC/cgilite/storage.sh" . "$_EXEC/cgilite/session.sh" diff --git a/tools.sh b/tools.sh index 2a851ab..1b7e677 100755 --- a/tools.sh +++ b/tools.sh @@ -1,5 +1,8 @@ #!/bin/sh +[ "$include_tools" ] && return 0 +include_tools="$0" + if [ "$(which awk)" ]; then md() { awk -f "$_EXEC/md_macros.awk" -f "$_EXEC/cgilite/markdown.awk"; } elif [ "$(which busybox)" ]; then