-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_and_checks.exec.sh
executable file
·76 lines (68 loc) · 2.61 KB
/
build_and_checks.exec.sh
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
73
74
75
76
#!/usr/bin/env bash
# This file is part of DevOrSysAdminScripts library.
#
# DevOrSysAdminScripts is free software:
# you can redistribute it and/or modify it under the terms
# of the GNU Lesser General Public License
# as published by the Free Software Foundation,
# either version 3 of the License,
# or (at your option) any later version.
#
# DevOrSysAdminScripts is distributed in the hope
# that it will be useful,
# but WITHOUT ANY WARRANTY;
# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of
# the GNU Lesser General Public License
# along with DevOrSysAdminScripts.
# If not, see <https://www.gnu.org/licenses/>.
#
# ©Copyright 2023-2024 Laurent Frédéric Bernard François Lyaudet
# The file "build_and_checks.exec.sh.tpl" was renamed from
# "build_and_checks.sh.tpl" to "build_and_checks.exec.sh.tpl".
# The file "build_and_checks.exec.sh" generated from the file
# "build_and_checks.sh.tpl" or "build_and_checks.exec.sh.tpl"
# was renamed from
# "build_and_checks.sh" to "build_and_checks.exec.sh".
build_and_checks(){
local LFBFL_working_directory="."
if [[ -n "$1" ]]; then
LFBFL_working_directory="$1"
fi
readonly LFBFL_working_directory
local LFBFL_verbose=""
if [[ "$2" == "--verbose" ]]; then
echo "$0 $*"
LFBFL_verbose="--verbose"
fi
readonly LFBFL_verbose
# shellcheck disable=SC1091
source ./wget_sha512.libr.sh
LFBFL_subdir="build_and_checks_dependencies"
mkdir -p "${LFBFL_subdir}/licenses_templates"
mkdir -p "${LFBFL_subdir}/listings"
# LFBFL_dependencies_raw_content_download_URL
local LFBFL_dependencies_URL
LFBFL_dependencies_URL="https://raw.githubusercontent.com/LLyaudet/"
LFBFL_dependencies_URL+="DevOrSysAdminScripts/main/${LFBFL_subdir}"
readonly LFBFL_dependencies_URL
declare -r LFBFL_common_file_name="common_build_and_checks.exec.sh"
# LFBFL_script_download_URL
declare -r\
LFBFL_script="${LFBFL_dependencies_URL}/${LFBFL_common_file_name}"
declare -r\
LFBFL_file_path="./${LFBFL_subdir}/${LFBFL_common_file_name}"
local LFBFL_correct_sha512
LFBFL_correct_sha512='b5843d9b440b839857df0cb3235acbf204aa0bdbed7a2'
LFBFL_correct_sha512+='ecc0126e007e909fa5aa04e5306e07330609c1717f53'
LFBFL_correct_sha512+='3b54f61038b7cf50d13092be8f85a355afb4152'
wget_sha512 "${LFBFL_file_path}" "${LFBFL_script}"\
"${LFBFL_correct_sha512}" "${LFBFL_verbose}"
chmod +x "./${LFBFL_file_path}"
"${LFBFL_file_path}" "${LFBFL_working_directory}"\
"${LFBFL_dependencies_URL}" "${LFBFL_verbose}"
}
build_and_checks "$@"