From 80d09dd06803e2e374a743e8cf976bd9ef68bbee Mon Sep 17 00:00:00 2001 From: vlefevre Date: Mon, 30 Jun 2014 13:44:39 +0000 Subject: [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 --- tools/build-patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/build-patch') 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" -- cgit v1.2.1