From 10f7688eaa7e3380960dcb7d53b28af78dffe96b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 14 Jan 2012 13:17:42 -0500 Subject: [PATCH] build: Don't call pwd in minstall This triggers a bug in the eglibc I'm currently using because the build process is inside a chroot, with a bind mount outside of it. --- bin/minstall | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/bin/minstall b/bin/minstall index 094ec0c..f69e1ca 100755 --- a/bin/minstall +++ b/bin/minstall @@ -61,27 +61,18 @@ if [ $# -ge 2 ] ; then ;; esac - PWDSAVE=`pwd` - # determine file's type if [ -h "$FILE" ] ; then #echo $FILE is a symlink # Unfortunately, cp -d isn't universal so we have to # use a work-around. - # Use ls -l to find the target that the link points to - LL=`ls -l "$FILE"` - for L in $LL ; do - TARGET=$L - done + TARGET=`readlink "$FILE"` #echo $FILE is a symlink pointing to $TARGET - FILE=`basename "$FILE"` # Go to $DEST and make the link - cd "$DEST" # pushd - $RM "$FILE" - $SYMLINK "$TARGET" "$FILE" - cd "$PWDSAVE" # popd + $RM $DEST/`basename "$FILE"` + $SYMLINK "$TARGET" $DEST/`basename "$FILE"` elif [ -f "$FILE" ] ; then #echo "$FILE" is a regular file -- 1.7.6.4