aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-28 22:41:44 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-28 22:41:44 +0000
commitaa9350268d19583c846a8229958f9dd26e5f5aae (patch)
treecf8a0d2b2580cc7ba58066c9d54206e7ff23ce15 /kiss
parent0b5a858756695272ad93d44190723c111fc06195 (diff)
downloadcpt-aa9350268d19583c846a8229958f9dd26e5f5aae.tar.gz
kiss: use printf instead of echo
FossilOrigin-Name: 2e38ecf2a3e24e2cd6490171d3343175abf3c2d4bf08847a5a963ade8547e735
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss10
1 files changed, 5 insertions, 5 deletions
diff --git a/kiss b/kiss
index 9151c6a..bb7b891 100755
--- a/kiss
+++ b/kiss
@@ -152,8 +152,8 @@ regex_escape() {
# Escape all required characters in both the search and
# replace portions of two strings for use in a 'sed' call
# as "plain-text".
- sea=$(echo "$1" | sed 's/[]\/$*.^[]/\\&/g')
- rep=$(echo "$2" | sed 's/[\/&]/\\&/g')
+ sea=$(printf %s "$1" | sed 's/[]\/$*.^[]/\\&/g')
+ rep=$(printf %s "$2" | sed 's/[\/&]/\\&/g')
}
pkg_lint() {
@@ -556,7 +556,7 @@ pkg_build() {
# There's no better way to remove a word from a string in
# POSIX 'sh' sadly.
contains "$deps" "$pkg" &&
- explicit=$(echo "$explicit" | sed "s/ $pkg / /g")
+ explicit=$(printf %s "$explicit" | sed "s/ $pkg / /g")
done
# See [1] at top of script.
@@ -601,7 +601,7 @@ pkg_build() {
# list. No better way than using 'sed' in POSIX 'sh'.
# See [1] at top of script.
# shellcheck disable=2046,2086
- set -- $(echo " $* " | sed "s/ $pkg / /")
+ set -- $(printf %s " $* " | sed "s/ $pkg / /")
}
}
done
@@ -825,7 +825,7 @@ pkg_conflicts() {
# Construct the file name of the "db" entry of the
# conflicting file. (pkg_name>usr>bin>ls)
- con_name=$(echo "$con" | sed 's|/|>|g')
+ con_name=$(printf %s "$con" | sed 's|/|>|g')
# Move the conflicting file to the choices directory
# and name it according to the format above.