This repository has been archived on 2026-03-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
eodev/eo/tutorial/Templates/create.sh
evomarc f3db65795b Big modifications - now the init and most important the operators
are handled in separate files make_genotype_xxx and make_op_xxx
as it was done in the examples of Lesson4
2001-10-04 20:12:19 +00:00

19 lines
630 B
Bash
Executable file

#! /bin/tcsh -f
if ($#argv < 2) then
echo Usage $argv[0] ApplicationName TargetDir
exit
endif
if (! -e $2) then
mkdir $2
endif
sed s/MyStruct/$1/g eoMyStruct.tmpl > $2/eo$1.h
sed s/MyStruct/$1/g init.tmpl > $2/eo$1Init.h
sed s/MyStruct/$1/g evalFunc.tmpl > $2/eo$1EvalFunc.h
sed s/MyStruct/$1/g mutation.tmpl > $2/eo$1Mutation.h
sed s/MyStruct/$1/g quadCrossover.tmpl > $2/eo$1QuadCrossover.h
sed s/MyStruct/$1/g MyStructEA.cpp > $2/$1EA.cpp
sed s/MyStruct/$1/g make_genotype_MyStruct.h > $2/make_genotype_$1.h
sed s/MyStruct/$1/g make_op_MyStruct.h > $2/make_op_$1.h
sed s/MyStruct/$1/g Makefile.tmpl > $2/Makefile