diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2012-06-11 12:24:20 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2012-06-11 12:24:20 +0000 |
commit | 15373ad9083d82cee3bd83303c4fc79563e34ad5 (patch) | |
tree | 1e7820c6c5be5a96a456039b2a6354c1ac339b3c /src | |
parent | Remove bugged but unused function tweak_list. #227507 (diff) | |
download | eselect-java-15373ad9083d82cee3bd83303c4fc79563e34ad5.tar.gz eselect-java-15373ad9083d82cee3bd83303c4fc79563e34ad5.tar.bz2 eselect-java-15373ad9083d82cee3bd83303c4fc79563e34ad5.zip |
No more global scope code. #362745
svn path=/projects/eselect-java/trunk/; revision=9070
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/java-nsplugin.eselect.in | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/modules/java-nsplugin.eselect.in b/src/modules/java-nsplugin.eselect.in index dc41267..6b9c7eb 100644 --- a/src/modules/java-nsplugin.eselect.in +++ b/src/modules/java-nsplugin.eselect.in @@ -18,12 +18,15 @@ SYSTEM_PLUGIN="${SYSTEM_PLUGIN_DIR}/javaplugin.so" SYSTEM_PLUGIN_32="${SYSTEM_PLUGIN_DIR_32}/javaplugin.so" SYSTEM_PLUGIN_64="${SYSTEM_PLUGIN_DIR_64}/javaplugin.so" -libdirs=$(list_libdirs) -if has lib32 ${libdirs} && has lib64 ${libdirs}; then - IS_MULTILIB="true" -else - IS_MULTILIB="false" -fi +is_multilib() { + local libdirs=$(list_libdirs) + if has lib32 ${libdirs} && has lib64 ${libdirs}; then + return 0 + else + return 1 + fi +} + ### show action ## {{{ show stuff @@ -64,7 +67,7 @@ fi } do_list() { - if [[ ${IS_MULTILIB} != "true" ]]; then + if ! is_multilib; then MULTILIB_MODE="none" local system_name=$(get_system_plugin_vm) local targets=( $(get_targets) ) @@ -104,7 +107,7 @@ fi } do_set() { - if [[ ${IS_MULTILIB} != "true" ]]; then + if ! is_multilib; then if [[ ${#} != 1 ]] ; then die -q "Usage: set [nsplugin-vm]" fi |