فهرست منبع

new package wizard: change bash-specific construct

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.
Peter Korsgaard 17 سال پیش
والد
کامیت
6fd903a4de
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      scripts/add_new_package.wizard

+ 1 - 2
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}