-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell-helpers.sh
More file actions
executable file
·72 lines (64 loc) · 2.38 KB
/
Copy pathshell-helpers.sh
File metadata and controls
executable file
·72 lines (64 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
###############################################################################
# Import the entire gammut of shell helper functions.
#
# Stand-alone scripts are not included; this helper merely loads the standard
# shell script library of functions.
#
# Copyright 2025 William W. Kimball, Jr., MBA, MSIS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
# Libraries must not be directly executed
if [ -z "${BASH_SOURCE[1]}" ]; then
echo "ERROR: Attempt to directly execute $0." >&2
exit 1
fi
# Constants
STD_SHELL_LIB_VERSION="2026.02.13-2"
readonly STD_SHELL_LIB_VERSION
# Reduce directory resolution overhead for all further library calls by caching
# the base directory of the library as STD_SHELL_LIB, when it isn't already set.
if [ -z "${STD_SHELL_LIB:-}" ]; then
STD_SHELL_LIB="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
fi
export STD_SHELL_LIB
# Logging facility
if ! source "${STD_SHELL_LIB}/logging/set-logger.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/logging/set-logger.sh" >&2
exit 2
fi
# General Docker helpers
if ! source "${STD_SHELL_LIB}/docker/source-functions.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/docker/source-functions.sh" >&2
exit 2
fi
# Math helpers
if ! source "${STD_SHELL_LIB}/math/math-helpers.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/math/math-helpers.sh" >&2
exit 2
fi
# SSH helpers
if ! source "${STD_SHELL_LIB}/ssh/ssh-helpers.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/ssh/ssh-helpers.sh" >&2
exit 2
fi
# Versioning helpers
if ! source "${STD_SHELL_LIB}/versioning/release-helpers.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/versioning/release-helpers.sh" >&2
exit 2
fi
# SCM helpers
if ! source "${STD_SHELL_LIB}/scm/scm-helpers.sh"; then
echo "ERROR: Unable to source ${STD_SHELL_LIB}/scm/scm-helpers.sh" >&2
exit 2
fi