From 8358ab56481289493a0662cf9d11eb712d86ce9e Mon Sep 17 00:00:00 2001 From: deal Date: Thu, 8 May 2003 15:29:31 +0000 Subject: [PATCH] Work around a problem in sh git-svn-id: https://svn.dealii.org/trunk@7612 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/results/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/results/Makefile b/tests/results/Makefile index c8eda13f61..1d61d732b7 100644 --- a/tests/results/Makefile +++ b/tests/results/Makefile @@ -1,4 +1,4 @@ -# $Id$ +# Makefile,v 1.10 2003/05/02 15:30:57 wolf Exp # Generate links to identical output files @@ -10,14 +10,18 @@ all: .links # the source directory, it creates a link from the source to the # target directory. This way, one has only to store the files that # differ and cross-link all the other files. +# +# in order to find out whether something is a link, we use "test -L ...". +# unfortunately, -L is not available in test when plain sh is used, so work +# around this by explicitely using bash linkfiles-%: - @TARGET=`echo $@ | $(PERL) -pi -e 's/linkfiles-//; s/-to-.*//;'` ; \ + TARGET=`echo $@ | $(PERL) -pi -e 's/linkfiles-//; s/-to-.*//;'` ; \ SOURCE=`echo $@ | $(PERL) -pi -e 's/.*-to-//;'` ; \ echo "Creating links from $$SOURCE into $$TARGET" ; \ cd $$SOURCE ; \ for i in */*output ; do \ if test ! -f ../$$TARGET/$$i ; then \ - if test -L ../$$TARGET/$$i ; then \ + if bash test -L ../$$TARGET/$$i ; then \ rm ../$$TARGET/$$i ; \ fi ; \ ln -s `pwd`/$$i ../$$TARGET/$$i ; \ -- 2.39.5