11#! /bin/bash
22
33# set -x
4-
5- true " $0 : START"
6-
7- MYDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
8- cd " $MYDIR "
9- cd ..
10- cd ..
11- cd ..
12-
134set -o errexit
145set -o nounset
156set -o errtrace
167set -o pipefail
178
9+ true " $0 : START"
10+
11+ MYDIR=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " && pwd ) "
12+ cd -- " $MYDIR "
13+ cd -- ..
14+ cd -- ..
15+ cd -- ..
16+
1817# # For future use in case of issues.
1918# # Building dist-installer-cli is not crucial and a workaround to skip it might unbreak the build process.
2019# # https://forums.whonix.org/t/derivative-maker-missing-usr-libexec-helper-scripts-get-colors-sh/20142
2120if [ " ${dist_build_skip_installer_dist_standalone:- } " = " true" ]; then
22- echo " $0 : INFO: Skipping to build dist-installer-cli because dist_build_skip_installer_dist_standalone=true, ok."
21+ printf ' %s\n ' " $0 : INFO: Skipping to build dist-installer-cli because dist_build_skip_installer_dist_standalone=true, ok."
2322 exit 0
2423fi
2524
@@ -40,7 +39,7 @@ base_name_target="${target##*/}"
4039# ## derivative-maker source code version.
4140# helper_path="../helper-scripts/usr/libexec/helper-scripts/"
4241# else
43- # echo "$0: ERROR: helper_path neither available in
42+ # printf '%s\n' "$0: ERROR: helper_path neither available in
4443# - /usr/libexec/helper-scripts/
4544# nor in
4645# ../helper-scripts/usr/libexec/helper-scripts/" >&2
@@ -54,7 +53,7 @@ base_name_target="${target##*/}"
5453helper_path=" /usr/libexec/helper-scripts/"
5554
5655if ! test -d " $helper_path " ; then
57- echo " $0 : ERROR: directory helper_path '$helper_path ' does not exist!" >&2
56+ printf ' %s\n ' " $0 : ERROR: directory helper_path '$helper_path ' does not exist!" >&2
5857 exit 1
5958fi
6059
@@ -67,7 +66,7 @@ awk -v origin="${0##*/}" -v helper="source ${helper_path}" '
6766 exit 1
6867 }
6968 print "##### BEGIN pasted by "origin " from file "$2
70- system("cat "$2)
69+ system("cat -- "$2)
7170 print "##### END pasted by "origin " from file "$2
7271 next
7372 }
@@ -84,12 +83,13 @@ sed -i \
8483## INSTEAD MODIFY ../../bin/dist-installer-cli and the functions sourced!\\
8584##########################\\
8685" \
86+ -- \
8787 " ${target} "
8888
89- echo " $0 : INFO: BUILD: SUCCESS"
90- echo " $0 : INFO: Running shellcheck..."
89+ printf ' %s\n ' " $0 : INFO: BUILD: SUCCESS"
90+ printf ' %s\n ' " $0 : INFO: Running shellcheck..."
9191
9292shellcheck " ${target} "
9393
94- echo " $0 : INFO: shellcheck: SUCCESS"
95- echo " $0 : INFO: END: OK"
94+ printf ' %s\n ' " $0 : INFO: shellcheck: SUCCESS"
95+ printf ' %s\n ' " $0 : INFO: END: OK"
0 commit comments