refactor(posix): replace echo bashisms with printf (fixes #479, SC3037)

This commit is contained in:
AJ ONeal
2022-08-21 06:49:34 +00:00
parent 53d1588c8d
commit fbcef3e583
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -118,9 +118,9 @@ __bootstrap_webi() {
# but that's okay, 'cmp -s' is good enough for us
if cmp -s "${pkg_src_cmd}" "${my_current_cmd}"; then
echo "${my_canonical_name} already installed:"
echo -n " ${pkg_dst}"
printf " %s" "${pkg_dst}"
if [ "${pkg_src_cmd}" != "${my_current_cmd}" ]; then
echo -n " => ${pkg_src}"
printf " => %s" "${pkg_src}"
fi
echo ""
exit 0
@@ -345,7 +345,7 @@ __bootstrap_webi() {
__init_installer() {
# do nothing - to satisfy parser prior to templating
echo -n ""
printf ""
# {{ installer }}
+3 -3
View File
@@ -17,11 +17,11 @@ __git_gpg_init() {
gpg-pubkey-id
)"
echo -n "Enabling automatic git commit signing...
git config --global user.signingkey ${MY_KEY_ID}
printf "Enabling automatic git commit signing...
git config --global user.signingkey %s
git config --global commit.gpgsign true
git config --global log.showSignature true
"
" "${MY_KEY_ID}"
git config --global user.signingkey "${MY_KEY_ID}"
git config --global commit.gpgsign true
+1 -1
View File
@@ -70,7 +70,7 @@ _create_gpg_key() {
echo >&2 "Choose a passphrase for this GPG Key."
echo >&2 "(the passphrase will not be shown as you type)"
echo >&2 ""
echo >&2 -n "Passphrase: "
printf >&2 "Passphrase: "
MY_REPLY="$(__shadow_read)"
echo >&2 ""
echo "