]> git.plutz.net Git - cgilite/commitdiff
include guards for function libraries
authorPaul Hänsch <paul@plutz.net>
Sun, 15 Jul 2018 14:04:23 +0000 (16:04 +0200)
committerPaul Hänsch <paul@plutz.net>
Sun, 15 Jul 2018 14:04:23 +0000 (16:04 +0200)
file.sh
storage.sh

diff --git a/file.sh b/file.sh
index 9f734c1d2dc2e1f33619d5cbe820c5c011221cc9..06f28d02f5640abfbfd560641348e8c8e8cd6e22 100755 (executable)
--- 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 <http://www.gnu.org/licenses/>. 
 
+[ -n "$include_fileserve" ] && return 0
+include_fileserve="$0"
+
 file_type(){
   case ${1##*.} in
     html|html) printf 'text/html';;
index d4fbca36714a0cfe08db9ea9d465d43b3ef83b9c..1d8764be745b1c0168a7b56302fc42340be272de 100755 (executable)
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with CGIlite.  If not, see <http://www.gnu.org/licenses/>. 
 
+[ -n "$include_storage" ] && return 0
+include_storage="$0"
+
 LOCK(){
   lock="${1}.lock"
   timeout="${2-20}"