From 75bb47f19de366893da3792b359b7e94c4656b89 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Tue, 1 Aug 2006 03:55:02 +0000 Subject: [PATCH] Replace calls to readlink with bash function svn path=/; revision=307 --- trunk/ChangeLog | 4 ++++ trunk/src/euse/euse | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 3cc782e..44e2e1e 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2006-07-31 Paul Varner + * euse: Replace calls to readlink with bash function for Gentoo/ALT + compatibility. (Bugs #140477, #128960) + 2006-07-28 Paul Varner * revdep-rebuild: Fix revdep-rebuild to correctly handle --ask being passed to emerge. Thanks to Sal Gonzalez for diff --git a/trunk/src/euse/euse b/trunk/src/euse/euse index eaf9645..df8d157 100755 --- a/trunk/src/euse/euse +++ b/trunk/src/euse/euse @@ -55,6 +55,14 @@ error() { exit 1 } +get_real_path() { + set -P + cd "$1" + pwd + cd $OLDPWD + set +P +} + check_sanity() { # file permission tests local descdir @@ -157,12 +165,12 @@ get_all_make_defaults() { local parent local rvalue - curdir="$(readlink -f ${MAKE_PROFILE_PATH})" + curdir="$(get_real_path ${MAKE_PROFILE_PATH})" while [ -f "${curdir}/parent" ]; do [ -f "${curdir}/make.defaults" ] && rvalue="${curdir}/make.defaults ${rvalue}" parent="$(egrep -v '(^#|^ *$)' ${curdir}/parent)" - curdir="$(readlink -f ${curdir}/${parent})" + curdir="$(get_real_path ${curdir}/${parent})" done echo "${rvalue}" @@ -173,11 +181,11 @@ get_make_defaults() { local curdir local parent - curdir="$(readlink -f ${MAKE_PROFILE_PATH})" + curdir="$(get_real_path ${MAKE_PROFILE_PATH})" while [ ! -f "${curdir}/make.defaults" -a -f "${curdir}/parent" ]; do parent="$(egrep -v '(^#|^ *$)' ${curdir}/parent)" - curdir="$(readlink -f ${curdir}/${parent})" + curdir="$(get_real_path ${curdir}/${parent})" done echo "${curdir}/make.defaults" -- 2.26.2