Skip to contentSkip to conversation

new package wizard: change bash-specific construct

PATCH New Markus Heidelberg 2 participants 2 messages Oct 21, 2008 – Oct 22, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 new package wizard: change bash-specific construct

${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(-)
scripts/add_new_package.wizard +1 -2
index 63078b0..c5398e4 100755
@@ -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}
 
Signature · 1 line
1.5.6.4
#1 lore raw

PATCH 1/1 new package wizard: change bash-specific construct

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Markus" == Markus Heidelberg <[email protected]> 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.

Signature · 1 line
Bye, Peter Korsgaard