Skip to content

Commit ca032a2

Browse files
committed
add a include gaurd like clang's include gaurd
1 parent 62f0346 commit ca032a2

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

Libraries/colors/colors.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
if [ -n "$DEFINE_COLORS_LIB" ];then
2+
return 0
3+
fi
4+
5+
DEFINE_COLORS_LIB=1
6+
7+
18
#https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
29

310
# Reset

Libraries/depcheck/depcheck.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
if [ -n "$DEFINE_DEPCHECK_LIB" ];then
2+
return 0
3+
fi
14

2-
5+
DEFINE_DEPCHECK_LIB=1
36

47
# shellcheck source=/usr/bin/abs.lib.logging
58
source abs.lib.logging

Libraries/list/list.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
if [ -n "$DEFINE_LIST_LIB" ];then
2+
return 0
3+
fi
4+
5+
DEFINE_LIST_LIB=1
6+
17
# scape_sed_special_chars(string_to_scape)
28
# Escapes special characters in a string for safe usage in sed commands.
39
# Parameters:

Libraries/logging/logging.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
if [ -n "$DEFINE_LOGGING_LIB" ];then
2+
return 0
3+
fi
4+
5+
DEFINE_LOGGING_LIB=1
6+
7+
8+
19
# shellcheck source=/usr/bin/abs.lib.colors
210
source abs.lib.colors
311
DATE_FMT="%Y-%m-%d %H:%M:%S"

0 commit comments

Comments
 (0)