new package wizard: change bash-specific construct
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 22 Oct 2008 05:19:04 +0000 (05:19 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 22 Oct 2008 05:19:04 +0000 (05:19 -0000)
Patch by Markus Heidelberg.

${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

index 63078b0fc2d90909633445270a3b5f30603f7fae..4ad72c935b3a4d18e039bc6cbad1f3842f22f63a 100755 (executable)
@@ -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}