summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-30 13:44:39 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-30 13:44:39 +0000
commit80d09dd06803e2e374a743e8cf976bd9ef68bbee (patch)
tree6f36b5c6a7b40193ba0949ab432c6821b0c4ca0d /tools
parent91c0d2401bc30f404dafb0c07e35f3d6750d1474 (diff)
downloadmpfr-80d09dd06803e2e374a743e8cf976bd9ef68bbee.tar.gz
[tools/build-patch] Correction if MPFR_CURRENT_DIR is set: to make sure
that it is always up-to-date, we want to allow it to be a symlink (e.g. .../mpfr-current), so that we want to call realpath on it. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9116 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/build-patch b/tools/build-patch
index 3b52a5de0..3fca1e7cd 100755
--- a/tools/build-patch
+++ b/tools/build-patch
@@ -15,8 +15,8 @@ if [[ $# -gt 3 || $1 == -* ]] then
exit 1
fi
-: ${MPFR_CURRENT_DIR:=$(realpath ~/mpfr-misc/www/mpfr-current)}
-base=$MPFR_CURRENT_DIR:t
+mpfrdir=$(realpath ${MPFR_CURRENT_DIR:-$HOME/mpfr-misc/www/mpfr-current})
+base=$mpfrdir:t
version=${base#mpfr-}
if [[ -z "$version" ]] then
@@ -36,10 +36,10 @@ checkobj "$base-a"
checkobj "$base-b"
checkobj "base-patch"
-atool -eqx -- "$MPFR_CURRENT_DIR/$base.tar.xz"
+atool -eqx -- "$mpfrdir/$base.tar.xz"
pushd "$base"
-touch -a "$MPFR_CURRENT_DIR/allpatches"
-patch -N -Z -p1 < "$MPFR_CURRENT_DIR/allpatches"
+touch -a "$mpfrdir/allpatches"
+patch -N -Z -p1 < "$mpfrdir/allpatches"
: > PATCHES
popd
mv -T "$base" "$base-a"