Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Commit b99789b

Browse files
CodingMarkusCodingMarkus
authored andcommitted
Use :..: instead of _..._ for include protection
1 parent eb56370 commit b99789b

17 files changed

+33
-33
lines changed

lib/psst/basic.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_basic_*) return
5+
*:basic:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_basic_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:basic:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/assert.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_assert_*) return
5+
*:assert:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_assert_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:assert:"
88

99

1010
##

lib/psst/basic/chkcmd.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_chkcmd_*) return
5+
*:chkcmd:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_chkcmd_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:chkcmd:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/const.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_const_*) return
5+
*:const:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_const_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:const:"
88

99

1010
##

lib/psst/basic/conv.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_conv_*) return
5+
*:conv:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_conv_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:conv:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/esc.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_esc_*) return
5+
*:esc:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_esc_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:esc:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/global.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_global_*) return
5+
*:global:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_global_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:global:"
88

99

1010
##

lib/psst/basic/ifs.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_ifs_*) return
5+
*:ifs:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_ifs_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:ifs:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/onexit.inc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
case "${INCLUDE_SEEN_PSST-}" in
55
*_onexit_*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_onexit_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:onexit:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/perror.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_perror_*) return
5+
*:perror:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_perror_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:perror:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/print.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_print_*) return
5+
*:print:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_print_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:print:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/stack.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_stack_*) return
5+
*:stack:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_stack_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:stack:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/basic/test.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_test_*) return
5+
*:test:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_test_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:test:"
88

99

1010
# shellcheck source=assert.inc.sh

lib/psst/basic/tmpdir.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_tempdir_*) return
5+
*:tempdir:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_tempdir_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:tempdir:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/file.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_file_*) return
5+
*:file:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_file_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:file:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/file/abspath.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_abspath_*) return
5+
*:abspath:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_abspath_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:abspath:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

lib/psst/file/glob.inc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# Double include protection
44
case "${INCLUDE_SEEN_PSST-}" in
5-
*_glob_*) return
5+
*:glob:*) return
66
esac
7-
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}_glob_"
7+
INCLUDE_SEEN_PSST="${INCLUDE_SEEN_PSST-}:glob:"
88

99
# Ensure INCLUDE_PSST is set
1010
[ -n "${INCLUDE_PSST-}" ] || { echo "INCLUDE_PSST not set!" >&2 ; exit 1 ; }

0 commit comments

Comments
 (0)