Translate - or + in package names to _ in variable name
This commit is contained in:
parent
ee5d77d3e0
commit
11d716798d
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
for pkg in $@
|
for pkg in $@
|
||||||
do
|
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}'_CFLAGS}" ] && '${varname}'_CFLAGS="$('${pkg}'-config --cflags)"'
|
||||||
echo '[ -z "${'${varname}'_LIBS}" ] && '${varname}'_LIBS="$('${pkg}'-config --libs)"'
|
echo '[ -z "${'${varname}'_LIBS}" ] && '${varname}'_LIBS="$('${pkg}'-config --libs)"'
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue