summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <dirtyepic@gentoo.org>2007-12-12 03:29:12 +0000
committerRyan Hill <dirtyepic@gentoo.org>2007-12-12 03:29:12 +0000
commit6b53e4b2555c30213374a1bad8beba047d7f6519 (patch)
tree046150af5f9de2f272065a4fa1e65d414f0ecbff /app-admin/eselect-wxwidgets
parenttidy (diff)
downloadgentoo-2-6b53e4b2555c30213374a1bad8beba047d7f6519.tar.gz
gentoo-2-6b53e4b2555c30213374a1bad8beba047d7f6519.tar.bz2
gentoo-2-6b53e4b2555c30213374a1bad8beba047d7f6519.zip
Output touchups. Handle none profile better.
(Portage version: 2.1.4_rc9)
Diffstat (limited to 'app-admin/eselect-wxwidgets')
-rw-r--r--app-admin/eselect-wxwidgets/ChangeLog6
-rwxr-xr-xapp-admin/eselect-wxwidgets/files/wx-config-0.514
-rwxr-xr-xapp-admin/eselect-wxwidgets/files/wxrc-0.52
-rw-r--r--app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.538
4 files changed, 26 insertions, 34 deletions
diff --git a/app-admin/eselect-wxwidgets/ChangeLog b/app-admin/eselect-wxwidgets/ChangeLog
index e10d92ba4325..5a61a30d19bb 100644
--- a/app-admin/eselect-wxwidgets/ChangeLog
+++ b/app-admin/eselect-wxwidgets/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/eselect-wxwidgets
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.5 2007/12/10 07:03:01 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.6 2007/12/12 03:29:11 dirtyepic Exp $
+
+ 12 Dec 2007; Ryan Hill <dirtyepic@gentoo.org> files/wx-config-0.5,
+ files/wxrc-0.5, files/wxwidgets.eselect-0.5:
+ Output touchups. Handle none profile better.
10 Dec 2007; Jeroen Roovers <jer@gentoo.org> eselect-wxwidgets-0.5.ebuild:
Marked ~hppa (bug #199594).
diff --git a/app-admin/eselect-wxwidgets/files/wx-config-0.5 b/app-admin/eselect-wxwidgets/files/wx-config-0.5
index 278e696e4f26..f9e1f2721b5e 100755
--- a/app-admin/eselect-wxwidgets/files/wx-config-0.5
+++ b/app-admin/eselect-wxwidgets/files/wx-config-0.5
@@ -5,29 +5,31 @@
# a lame wx-config wrapper by dirtyepic@gentoo.org
_wxerror() {
+ echo "An error occurred while calling wx-config:"
echo
- echo "Cannot find the currently selected wxWidgets profile."
+ echo " ${1}"
echo
echo "Please use \`eselect wxwidgets\` to select an available profile and try again."
- echo
exit 1
}
if [[ -n ${WX_ECLASS_CONFIG} ]]; then
- ${WX_ECLASS_CONFIG} $@
+ ${WX_ECLASS_CONFIG} "$@"
exit 0
else
if [[ -e /var/lib/wxwidgets/current ]]; then
source /var/lib/wxwidgets/current
else
- _wxerror
+ _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )"
fi
+ [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected"
+
if [[ -f /usr/lib/wx/config/${WXCONFIG} \
&& -x /usr/lib/wx/config/${WXCONFIG} ]]; then
- /usr/lib/wx/config/${WXCONFIG} $@
+ /usr/lib/wx/config/${WXCONFIG} "$@"
else
- _wxerror
+ _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )"
fi
exit 0
fi
diff --git a/app-admin/eselect-wxwidgets/files/wxrc-0.5 b/app-admin/eselect-wxwidgets/files/wxrc-0.5
index cfc0f0f50402..c09fd94dd51c 100755
--- a/app-admin/eselect-wxwidgets/files/wxrc-0.5
+++ b/app-admin/eselect-wxwidgets/files/wxrc-0.5
@@ -3,4 +3,4 @@
# /usr/bin/wxrc
# another lame wrapper by dirtyepic@gentoo.org
-$(/usr/bin/wx-config --utility=wxrc) $@
+/usr/bin/wx-config --utility=wxrc "$@"
diff --git a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5 b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
index 76f645d998bc..9ccc934959b4 100644
--- a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
+++ b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v 1.1 2007/11/18 21:21:10 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v 1.2 2007/12/12 03:29:12 dirtyepic Exp $
inherit config
@@ -34,11 +34,11 @@ set_config() {
:
else
[[ ! -f ${WXCONFDIR}/${target} ]] && \
- die -q "\"${1}\" doesn't appear to be a valid profile name."
+ die -q "\"${1}\" doesn't appear to be a valid profile name"
fi
echo
- echo "Setting wxWidgets profile to ${target}."
+ echo "Setting wxWidgets profile to ${target}"
echo
store_config ${WXCONFFILE} WXCONFIG ${target}
}
@@ -46,7 +46,7 @@ set_config() {
### show action ###
describe_show() {
- echo "Show the currently selected profile."
+ echo "Show the currently selected profile"
}
do_show() {
@@ -63,7 +63,7 @@ do_show() {
### list action ###
describe_list() {
- echo "List available profiles."
+ echo "List available profiles"
}
do_list() {
@@ -89,7 +89,7 @@ do_list() {
### set action ###
describe_set() {
- echo "Set the system wxWidgets profile."
+ echo "Set the system wxWidgets profile"
}
describe_set_options() {
@@ -111,30 +111,17 @@ do_set() {
}
describe_update() {
- echo "Check the validity of the current profile and update it if invalid."
+ echo "Check current profile and update it if invalid (internal use only)"
}
do_update() {
- # the only way we'd be without a conffile is if the user deleted it
- # easy enough to generate a new one though
- if [[ ! -e ${WXCONFFILE} ]]; then
- echo
- write_warning_msg "Could not find a current wxWidgets profile."
- write_warning_msg
- write_warning_msg "Please use eselect wxwidgets to set one."
- echo
- return 1
- fi
-
currconf=$(load_config ${WXCONFFILE} WXCONFIG)
- # if current config is valid, leave it alone
- if [[ -e ${WXCONFDIR}/${currconf} ]]; then
- echo
- echo "Current wxWidgets profile is valid."
- echo
- return 0
- fi
+ # if current config is "none" leave it alone
+ [[ ${currconf} == none ]] && return 0
+
+ # if current config is valid leave it alone
+ [[ -e ${WXCONFDIR}/${currconf} ]] && return 0
# split the config string into components
OIFS=${IFS}
@@ -150,7 +137,6 @@ do_update() {
wxdebug=(${3})
wxver=(${4})
-
# put available components into next element(s) of array
local component toolkit char debug ver element opt