File tree Expand file tree Collapse file tree
usr/libexec/helper-scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# # Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
44# # See the file COPYING for copying conditions.
55
6- # # Code duplication. Copied from
7- # # helper-scripts/usr/libexec/helper-scripts/check_runtime.bsh.
8- # #
9- # # Because check_runtime.bsh cannot be sourced here (this will be run when
6+ # # check_runtime.bsh cannot be sourced here (this will be run when
107# # derivative-maker is used, and the build host may not have helper-scripts
118# # installed).
12- was_executed () {
13- local caller_bash_source_zero=" ${1} "
14- if [[ " ${caller_bash_source_zero} " == " ${0} " ]] \
15- || [[ " ${caller_bash_source_zero} " == " $( command -v " ${0} " ) " ]]; then
16- return 0
17- fi
18- return 1
19- }
20- should_run_unit_tests () {
21- local caller_bash_source_zero=" ${1} "
22- if was_executed " ${caller_bash_source_zero} " \
23- && ! [ " ${SKIP_UNIT_TESTS-} " = ' true' ]; then
24- return 0
25- fi
26- return 1
27- }
9+ # # Literal code duplication is bad.
10+ # # Confuses shellcheck for dist-installer-cli-standalone.
11+ if test -f /usr/libexec/helper-scripts/check_runtime.bsh; then
12+ # # Use 'source_encoded' to avoid
13+ # # /usr/share/usability-misc/build-dist-installer-cli
14+ # # from in-lining the source code.
15+ source_encoded=source
16+ " $source_encoded " /usr/libexec/helper-scripts/check_runtime.bsh
17+ fi
2818
2919br_add () {
3020 local in out
You can’t perform that action at this time.
0 commit comments