diff options
author | Ryan Hill <dirtyepic@gentoo.org> | 2010-01-24 21:45:08 +0000 |
---|---|---|
committer | Ryan Hill <dirtyepic@gentoo.org> | 2010-01-24 21:45:08 +0000 |
commit | a310c0f52ef15fee4eeefda29564ec4a9043567d (patch) | |
tree | 88db9ad64784a3c3c31b84e9cf8889f566b62b9e /app-admin/eselect-wxwidgets/files/wx-config-1.3 | |
parent | Filter ecj-3.5 (diff) | |
download | gentoo-2-a310c0f52ef15fee4eeefda29564ec4a9043567d.tar.gz gentoo-2-a310c0f52ef15fee4eeefda29564ec4a9043567d.tar.bz2 gentoo-2-a310c0f52ef15fee4eeefda29564ec4a9043567d.zip |
Fix bashisms in wrapper scripts. Bug #301778 by Anthony Parsons.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/eselect-wxwidgets/files/wx-config-1.3')
-rwxr-xr-x | app-admin/eselect-wxwidgets/files/wx-config-1.3 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app-admin/eselect-wxwidgets/files/wx-config-1.3 b/app-admin/eselect-wxwidgets/files/wx-config-1.3 new file mode 100755 index 000000000000..e61cdcac5608 --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wx-config-1.3 @@ -0,0 +1,38 @@ +#!/bin/sh - +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-1.3,v 1.1 2010/01/24 21:45:08 dirtyepic Exp $ +# +# /usr/bin/wx-config +# +# a lame wx-config wrapper (bugs to wxwidgets@gentoo.org) + +_wxerror() { + cat >&2 <<- EOF + An error occurred while calling wx-config: + + ${1} + + Please use \`eselect wxwidgets\` to select an available profile and try again. + EOF + exit 1 +} + +if [ -n "${WX_ECLASS_CONFIG}" ]; then + ${WX_ECLASS_CONFIG} "$@" + exit 0 +else + if [ -e /var/lib/wxwidgets/current ]; then + . /var/lib/wxwidgets/current + else + _wxerror "Cannot find the wxWidgets profile configuration ( /var/lib/wxwidgets/current )" + fi + + [ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" + + if [ -x /usr/lib/wx/config/${WXCONFIG} ]; then + /usr/lib/wx/config/${WXCONFIG} "$@" + else + _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" + fi + exit 0 +fi + |