--- sh.eselect.orig 2009-07-30 11:44:52.445574513 +0200 +++ sh.eselect 2009-07-30 11:44:26.097564398 +0200 @@ -9,16 +9,15 @@ VERSION=$(svn_date_to_version "${SVN_DAT ## Functions ## -# find a list of vi symlink targets, best first +# find a list of sh symlink targets, best first find_targets() { local f for f in \ "${ROOT}"/bin/bash \ - "${ROOT}"/bin/busybox \ "${ROOT}"/bin/dash \ "${ROOT}"/bin/zsh \ ; do - if [[ -f "${f}" ]] ; then + if [[ -x "${f}" ]] ; then echo $(basename "${f}" ) fi done @@ -45,10 +44,10 @@ set_symlinks() { # dir="${ROOT}/usr/bin" #fi - if [[ -f "${ROOT}/bin/${target}" ]] ; then + if [[ -x "${ROOT}/bin/${target}" ]] ; then remove_symlinks - ln -s "${ROOT}/bin/${target}" "${ROOT}/bin/sh" || \ + ln -s "${target}" "${ROOT}/bin/sh" || \ die "Couldn't set ${target} /bin/sh symlink" else die -q "Target \"${1}\" doesn't appear to be valid!" @@ -118,7 +117,7 @@ do_set() { elif [[ -n "${2}" ]] ; then die -q "Too many parameters" - elif [[ -L "${ROOT}/usr/bin/vi" ]] ; then + elif [[ -L "${ROOT}/bin/sh" ]] ; then if ! remove_symlinks ; then die -q "Can't remove existing provider" elif ! set_symlinks "${1}" ; then @@ -159,4 +158,3 @@ do_update() { } # vim: set ft=eselect : -