aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Robert S. Gerus <arachnist@gmail.com> 2006-05-25 06:50:28 +0000
committerAvatar Robert S. Gerus <arachnist@gmail.com> 2006-05-25 06:50:28 +0000
commit7ee339a9dd77837960754bb9e058187783978fb7 (patch)
tree6e0dfc0997b13782c8dccb38cd68a46bb3e1c0ec
parent9aba6db5b58f8686db2b738892d2a894e7d0d6cc (diff)
downloadpaludis-7ee339a9dd77837960754bb9e058187783978fb7.tar.gz
paludis-7ee339a9dd77837960754bb9e058187783978fb7.tar.xz
Replace readlink -f with realpath, for portability.
-rw-r--r--doc/Makefile.am2
-rw-r--r--ebuild/builtin_merge.bash2
-rw-r--r--ebuild/builtin_unmerge.bash2
-rwxr-xr-xebuild/ebuild.bash6
-rw-r--r--ebuild/portage_stubs.bash4
-rwxr-xr-xebuild/utils/merge4
-rwxr-xr-xebuild/utils/unmerge2
7 files changed, 11 insertions, 11 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6c233d5..5424ed8 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -42,6 +42,6 @@ maintainer-clean-local :
find html/ -type f | grep -v '\.svn' | xargs rm
upload-homepage : doxygen
- cd `readlink -f $(top_srcdir)/doc/html` && tar jc ./ | \
+ cd `realpath $(top_srcdir)/doc/html` && tar jc ./ | \
ssh shell.berlios.de tar vjx -C /home/groups/paludis/htdocs/
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
index 138e82d..95ac79c 100644
--- a/ebuild/builtin_merge.bash
+++ b/ebuild/builtin_merge.bash
@@ -84,7 +84,7 @@ ebuild_f_merge()
local old_sandbox_write="${SANDBOX_WRITE}"
SANDBOX_WRITE="${SANDBOX_WRITE+${SANDBOX_WRITE}:}${ROOT%/}/"
local old_sandbox_on="${SANDBOX_ON}"
- [[ "$(readlink -f ${ROOT} )" != "/" ]] || SANDBOX_ON=0
+ [[ "$(realpath ${ROOT} )" != "/" ]] || SANDBOX_ON=0
if hasq "merge" ${RESTRICT} ; then
ebuild_section "Skipping builtin_merge (RESTRICT)"
diff --git a/ebuild/builtin_unmerge.bash b/ebuild/builtin_unmerge.bash
index b699927..0eb0b62 100644
--- a/ebuild/builtin_unmerge.bash
+++ b/ebuild/builtin_unmerge.bash
@@ -61,7 +61,7 @@ ebuild_f_unmerge()
local old_sandbox_write="${SANDBOX_WRITE}"
SANDBOX_WRITE="${SANDBOX_WRITE+${SANDBOX_WRITE}:}${ROOT%/}/"
local old_sandbox_on="${SANDBOX_ON}"
- [[ "$(readlink -f ${ROOT} )" != "/" ]] || SANDBOX_ON=0
+ [[ "$(realpath ${ROOT} )" != "/" ]] || SANDBOX_ON=0
if hasq "unmerge" ${RESTRICT} ; then
ebuild_section "Skipping builtin_unmerge (RESTRICT)"
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 8727a0a..8fd069e 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -55,7 +55,7 @@ diefunc()
exit 249
}
-EBUILD_MODULES_DIR=$(readlink -f $(dirname $0 ) )
+EBUILD_MODULES_DIR=$(realpath $(dirname $0 ) )
[[ -d ${EBUILD_MODULES_DIR} ]] || die "${EBUILD_MODULES_DIR} is not a directory"
export PALUDIS_EBUILD_MODULES_DIR="${EBUILD_MODULES_DIR}"
@@ -79,7 +79,7 @@ ebuild_source_profile()
{
if [[ -f ${1}/parent ]] ; then
while read line; do
- ebuild_source_profile $(readlink -f ${1}/${line} )
+ ebuild_source_profile $(realpath ${1}/${line} )
done <${1}/parent
fi
@@ -99,7 +99,7 @@ for var in ${save_vars} ; do
done
if [[ -n "${PALUDIS_PROFILE_DIR}" ]] ; then
- ebuild_source_profile $(readlink -f "${PALUDIS_PROFILE_DIR}")
+ ebuild_source_profile $(realpath "${PALUDIS_PROFILE_DIR}")
fi
unset ${save_vars}
diff --git a/ebuild/portage_stubs.bash b/ebuild/portage_stubs.bash
index 9f70bf2..0063a0f 100644
--- a/ebuild/portage_stubs.bash
+++ b/ebuild/portage_stubs.bash
@@ -30,7 +30,7 @@ portageq()
{
# \todo Make this suck less...
if [[ "$1" == "has_version" ]] ; then
- if [[ "$(readlink -f $2 )" != "$(readlink -f $ROOT )" ]] ; then
+ if [[ "$(realpath $2 )" != "$(realpath $ROOT )" ]] ; then
eerror "Error emulating 'portageq $@':"
die "portageq has_version emulation only works on current ROOT"
else
@@ -38,7 +38,7 @@ portageq()
has_version "$@"
fi
elif [[ "$1" == "best_version" ]] ; then
- if [[ "$(readlink -f $2 )" != "$(readlink -f $ROOT )" ]] ; then
+ if [[ "$(realpath $2 )" != "$(realpath $ROOT )" ]] ; then
eerror "Error emulating 'portageq $@':"
die "portageq best_version emulation only works on current ROOT"
else
diff --git a/ebuild/utils/merge b/ebuild/utils/merge
index 567789b..91052dc 100755
--- a/ebuild/utils/merge
+++ b/ebuild/utils/merge
@@ -27,10 +27,10 @@ fi
shopt -s dotglob
shopt -s nullglob
-src=$(readlink -f "${1%/}/" )
+src=$(realpath "${1%/}/" )
src="${src//+(\/)/\/}"
export top_src="${src}"
-dst=$(readlink -f "${2%/}/" )
+dst=$(realpath "${2%/}/" )
dst="${dst//+(\/)/\/}"
export top_dst="${dst}"
export contents=${3}
diff --git a/ebuild/utils/unmerge b/ebuild/utils/unmerge
index a51d69e..572adfc 100755
--- a/ebuild/utils/unmerge
+++ b/ebuild/utils/unmerge
@@ -27,7 +27,7 @@ fi
shopt -s dotglob
shopt -s nullglob
-ROOT=$(readlink -f "${1%+(/)}/" )
+ROOT=$(realpath "${1%+(/)}/" )
export ROOT
export contents=${2}