]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a problem in sh
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 8 May 2003 15:29:31 +0000 (15:29 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 8 May 2003 15:29:31 +0000 (15:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@7612 0785d39b-7218-0410-832d-ea1e28bc413d

tests/results/Makefile

index c8eda13f615b4b0888fc37b1e5f3c7a87478fb6d..1d61d732b733dc0f0abb375123ec013ccb131da8 100644 (file)
@@ -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 ; \

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.