diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-04 10:05:18 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-04 10:05:18 +0000 |
commit | 19eb223fd13fa3ad49e98ce2f561f705b3f81d96 (patch) | |
tree | ff91541333362ca7bb4c10f388e0727657278fb3 | |
parent | dae6ca25163e947242f7281dde691bd19cc297fe (diff) |
Copy parameter files to examples directory rather than thornparfiles
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1517 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | lib/sbin/CopyParFiles.pl | 14 |
2 files changed, 17 insertions, 17 deletions
@@ -16,7 +16,7 @@ # # # @enddesc -# @version $Id: Makefile,v 1.81 2000-03-23 14:58:31 allen Exp $ +# @version $Id: Makefile,v 1.82 2000-04-04 10:05:17 allen Exp $ # @@*/ ################################################################################## @@ -311,7 +311,7 @@ else @echo " (forces the CST to be rerun)." @echo " -testsuite : run the test program." @echo " -thornlist : regenerates the ThornList file. " - @echo " -thornparfiles : copies example parameter files to thornparfiles." + @echo " -examples : copies thorn parameter files to examples directory." endif @echo $(DIVIDER) @echo $(MAKE) also knows the following targets @@ -645,26 +645,26 @@ endif ifneq ($strip($(CONFIGURATIONS)),) -.PHONY $(addsuffix -thornparfiles,$(CONFIGURATIONS)): +.PHONY $(addsuffix -examples,$(CONFIGURATIONS)): # Copy thorn parameter files -.PHONY thornparfiles: +.PHONY examples: -thornparfiles: +examples: @echo $(DIVIDER) @echo Please specify a configuration. @echo $(DIVIDER) -$(addsuffix -thornparfiles,$(CONFIGURATIONS)): +$(addsuffix -examples,$(CONFIGURATIONS)): @echo $(DIVIDER) - @echo Copying parameter files $(@:%-thornparfiles=%) - if [ -r $(CONFIGS_DIR)/$(@:%-thornparfiles=%)/ThornList ] ; then $(PERL) lib/sbin/CopyParFiles.pl $(@:%-thornparfiles=%) ; fi + @echo Copying parameter files $(@:%-examples=%) + if [ -r $(CONFIGS_DIR)/$(@:%-examples=%)/ThornList ] ; then $(PERL) lib/sbin/CopyParFiles.pl $(@:%-examples=%) ; fi endif -%-thornparfiles: +%-examples: @echo $(DIVIDER) - @echo Configuration $(@:%-thornparfiles=%) does not exist. + @echo Configuration $(@:%-examples=%) does not exist. @echo Parameter file copying aborted. diff --git a/lib/sbin/CopyParFiles.pl b/lib/sbin/CopyParFiles.pl index ca51fc99..8345a01f 100644 --- a/lib/sbin/CopyParFiles.pl +++ b/lib/sbin/CopyParFiles.pl @@ -13,16 +13,16 @@ $config = $ARGV[0]; open(THORNLIST,"<configs/$config/ThornList") || die "ThornList not available"; -# Create thornparfiles directory if needed -if (! -d "thornparfiles") +# Create examples directory if needed +if (! -d "examples") { - mkdir("thornparfiles", 0755) || die "Unable to create thornparfiles directory"; + mkdir("examples", 0755) || die "Unable to create examples directory"; } # Create configuration directory if needed -if (! -d "thornparfiles/$config") +if (! -d "examples/$config") { - mkdir("thornparfiles/$config", 0755) || die "Unable to create thornparfiles/$config directory"; + mkdir("examples/$config", 0755) || die "Unable to create examples/$config directory"; } # Create an array of compiled thorns @@ -69,14 +69,14 @@ for ($i=0;$i<$nthorns;$i++) if ($gotall == 1) { - if (-e "$home/thornparfiles/$config/$parfile") + if (-e "$home/examples/$config/$parfile") { print " $parfile: Exists, no overwrite\n"; } else { print " $parfile: Copying\n"; - system("cp $parfile $home/thornparfiles/$config/$parfile"); + system("cp $parfile $home/examples/$config/$parfile"); } } else |