Innovenergy_trunk/csharp/Lib/Units/Generator/generate.sh

13 lines
304 B
Bash
Executable File

#!/usr/bin/env bash
scriptDir=$( dirname -- "$0"; )
cd "$scriptDir/.." || exit
for file in $(grep -l '\[Generate\]' *.cs)
do
filename=$(basename -- "$file")
class="${filename%.*}"
echo "generating $filename"
sed "s/Template/$class/g" "./Generator/Template.txt" > "./$class.generated.cs"
done