mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 06:05:44 -04:00
HvD: A few scripts to automatically add $Id: $ constructs to files. For simplicity they
append this construct to a file, rather than prepending it. Although this is not so fancy it satisfies the needs of the util "make version" command which simply depends on this construct be extractable from the file.
This commit is contained in:
parent
d11dba624b
commit
f3d0453074
3 changed files with 34 additions and 0 deletions
24
contrib/add_Id
Executable file
24
contrib/add_Id
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# add_Id
|
||||
# ------
|
||||
#
|
||||
# This script looks for source code files that do not have a $Id: $ construct in them.
|
||||
# When such a file is found it will add the particular construct at the end of the file.
|
||||
#
|
||||
export ADD_ID_FORTRAN=${NWCHEM_TOP}/contrib/add_Id_Fortran
|
||||
export ADD_ID_C=${NWCHEM_TOP}/contrib/add_Id_C
|
||||
#
|
||||
echo -n "Adding \$Id: \$ to Fortran header files... "
|
||||
find . -name "*.fh" ! -exec grep Id: {} \; -exec $ADD_ID_FORTRAN {} \; 2>&1 > /dev/null
|
||||
echo "Done"
|
||||
echo -n "Adding \$Id: \$ to Fortran source files... "
|
||||
find . -name "*.f" ! -exec grep Id: {} \; -exec $ADD_ID_FORTRAN {} \; 2>&1 > /dev/null
|
||||
find . -name "*.F" ! -exec grep Id: {} \; -exec $ADD_ID_FORTRAN {} \; 2>&1 > /dev/null
|
||||
echo "Done"
|
||||
echo -n "Adding \$Id: \$ to C header files... "
|
||||
find . -name "*.h" ! -exec grep Id: {} \; -exec $ADD_ID_C {} \; 2>&1 > /dev/null
|
||||
echo "Done"
|
||||
echo -n "Adding \$Id: \$ to C source files... "
|
||||
find . -name "*.c" ! -exec grep Id: {} \; -exec $ADD_ID_C {} \; 2>&1 > /dev/null
|
||||
echo "Done"
|
||||
5
contrib/add_Id_C
Executable file
5
contrib/add_Id_C
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Add the $Id: $ construct to a C file. For simplicity it is simply appended.
|
||||
#
|
||||
echo "/* \$Id: \$ */" >> $1
|
||||
5
contrib/add_Id_Fortran
Executable file
5
contrib/add_Id_Fortran
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Add the $Id: $ construct to a Fortran file. For simplicity it is simply appended.
|
||||
#
|
||||
echo "c \$Id: \$" >> $1
|
||||
Loading…
Add table
Add a link
Reference in a new issue