diff -Nur gentoolkit-0.3.0.7.orig/bin/euse gentoolkit-0.3.0.7/bin/euse --- gentoolkit-0.3.0.7.orig/bin/euse 2012-10-10 06:36:24.000000000 +0900 +++ gentoolkit-0.3.0.7/bin/euse 2012-11-18 18:16:43.948416725 +0900 @@ -466,7 +466,7 @@ if [[ -f "${curdir}/parent" ]]; then for parent in $(egrep -v '(^#|^ *$)' ${curdir}/parent); do # Bug 231394, handle parent path being absolute - index=$(expr index "${parent}" :) + index=$(echo "${parent}" | sed -n 's/:.*//p' | wc -c) if [[ ${parent:0:1} == "/" ]]; then pdir="$(get_real_path ${parent})" elif [[ $index -eq 0 ]]; then @@ -1315,6 +1315,23 @@ echo "${MAKE_CONF_PATH} was modified, a backup copy has been placed at ${MAKE_CONF_BACKUP_PATH}" } # }}} +# GNU sed wrapper +sed(){ + if [ -e /usr/bin/gsed ] + then + /usr/bin/gsed "$@" + elif [ -e /bin/sed ] + then + /bin/sed "$@" + elif [ -e /usr/bin/sed ] + then + /usr/bin/sed "$@" + else + echo "ERROR: failed the selection of sed." + exit 1 + fi +} + ##### main program comes now ##### parse_arguments "$@"