codeTemplates: The copyright year is now set automatically

This commit is contained in:
Will Bainbridge
2017-04-18 11:01:41 +01:00
parent 23d9e2e912
commit ea257737df
34 changed files with 50 additions and 38 deletions

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@ -62,9 +62,12 @@ esac
[ -d "$1" ] && usage "$1 directory already exists, aborting..."
NAME=$1
YEAR=$(date +%Y)
echo "Creating application code directory $NAME" && mkdir $NAME
sed "s#NAME#${NAME}#g" ${DIR}/app.C > $NAME/$NAME.C
sed -e "s#NAME#${NAME}#g" \
-e "s#YEAR#${YEAR}#g" \
${DIR}/app.C > $NAME/$NAME.C
echo "Creating Make subdirectory" && mkdir $NAME/Make
sed "s#NAME#${NAME}#g" ${DIR}/Make/files > $NAME/Make/files