Translate - or + in package names to _ in variable name

This commit is contained in:
Laurence Withers 2007-08-13 18:58:20 +00:00
parent ee5d77d3e0
commit 11d716798d
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
for pkg in $@
do
varname="$(echo "${pkg}" | tr a-z A-Z)"
varname="$(echo "${pkg}" | tr 'a-z-+' 'A-Z__')"
echo '[ -z "${'${varname}'_CFLAGS}" ] && '${varname}'_CFLAGS="$('${pkg}'-config --cflags)"'
echo '[ -z "${'${varname}'_LIBS}" ] && '${varname}'_LIBS="$('${pkg}'-config --libs)"'
done