Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] new package wizard: change bash-specific construct
@ 2008-10-21 21:10 Markus Heidelberg
  2008-10-22  5:19 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Heidelberg @ 2008-10-21 21:10 UTC (permalink / raw)
  To: buildroot

${VAR//-/_} which replaces - with _ aborts with "syntax error" on a
system where /bin/sh points to dash. Use tr therefor as already done in
the line above rather than changing the shebang to bash.
---
 scripts/add_new_package.wizard |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard
index 63078b0..c5398e4 100755
--- a/scripts/add_new_package.wizard
+++ b/scripts/add_new_package.wizard
@@ -48,8 +48,7 @@ read CONFIG_OPTIONS
 URL=${DOWNLOAD_LOC%/*}
 TARBALL=${DOWNLOAD_LOC##*/}
 EXTENSION=${TARBALL##*.tar.}
-NAME_UPPER=`echo ${PACKAGE_NAME} | tr [a-z] [A-Z]`
-NAME_UPPER=${NAME_UPPER//-/_}
+NAME_UPPER=`echo ${PACKAGE_NAME} | tr [a-z-] [A-Z_]`
 
 mkdir ../package/${PACKAGE_NAME}
 
-- 
1.5.6.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] new package wizard: change bash-specific construct
  2008-10-21 21:10 [Buildroot] [PATCH] new package wizard: change bash-specific construct Markus Heidelberg
@ 2008-10-22  5:19 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2008-10-22  5:19 UTC (permalink / raw)
  To: buildroot

>>>>> "Markus" == Markus Heidelberg <markus.heidelberg@web.de> writes:

 Markus> ${VAR//-/_} which replaces - with _ aborts with "syntax error" on a
 Markus> system where /bin/sh points to dash. Use tr therefor as already done in
 Markus> the line above rather than changing the shebang to bash.

Thanks, committed as r23761.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-22  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 21:10 [Buildroot] [PATCH] new package wizard: change bash-specific construct Markus Heidelberg
2008-10-22  5:19 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox