From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/netifrc:master commit in: sh/
Date: Thu, 22 Jan 2015 23:01:25 +0000 (UTC) [thread overview]
Message-ID: <1421409482.4f303b048743f494a79916a0a30ecb3b027164b7.robbat2@OpenRC> (raw)
commit: 4f303b048743f494a79916a0a30ecb3b027164b7
Author: Guillaume Castagnino <gcastagnino <AT> denyall <DOT> com>
AuthorDate: Fri Jan 16 11:57:15 2015 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Jan 16 11:58:02 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=4f303b04
fix https://bugs.gentoo.org/show_bug.cgi?id=536758
The shill version of shell_var is not correctly escaping vars
---
sh/functions.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sh/functions.sh b/sh/functions.sh
index 368bb73..d82d72a 100644
--- a/sh/functions.sh
+++ b/sh/functions.sh
@@ -33,11 +33,14 @@ if [ -z "$(command -v service_set_value >/dev/null 2>&1)" ]; then
}
shell_var() {
- local output=$1 sanitized_arg=
- shift 1
+ local output= sanitized_arg=
for arg; do
sanitized_arg="${arg//[^a-zA-Z0-9_]/_}"
- output="$output $arg"
+ if [ x"$output" = x"" ] ; then
+ output=$sanitized_arg
+ else
+ output="$output $sanitized_arg"
+ fi
done
echo "$output"
}
next reply other threads:[~2015-01-22 23:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 23:01 Robin H. Johnson [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-25 0:45 [gentoo-commits] proj/netifrc:master commit in: sh/ Patrick McLean
2019-04-21 5:34 Robin H. Johnson
2019-04-21 4:17 Robin H. Johnson
2016-10-24 22:26 Robin H. Johnson
2016-07-19 19:59 Robin H. Johnson
2015-01-16 18:16 Robin H. Johnson
2015-01-16 18:16 Robin H. Johnson
2015-01-09 17:17 Robin H. Johnson
2015-01-09 17:17 Robin H. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421409482.4f303b048743f494a79916a0a30ecb3b027164b7.robbat2@OpenRC \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox