mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 07:17:06 +01:00
Hadrons is now a library, the previous XML driven program is now a test
This commit is contained in:
15
extras/Hadrons/add_module.sh
Executable file
15
extras/Hadrons/add_module.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# != 1 )); then
|
||||
echo "usage: `basename $0` <module name>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
NAME=$1
|
||||
|
||||
if [ -e "Modules/${NAME}.cc" ] || [ -e "Modules/${NAME}.hpp" ]; then
|
||||
echo "error: files Modules/${NAME}.* already exists" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
sed "s/___FILEBASENAME___/${NAME}/g" Module.cc.template > Modules/${NAME}.cc
|
||||
sed "s/___FILEBASENAME___/${NAME}/g" Module.hpp.template > Modules/${NAME}.hpp
|
||||
./make_module_list.sh
|
Reference in New Issue
Block a user