Script for updating headers of files to current OF version
1 Attachment(s)
hello,
I have been playing around doing some scripts for other things, and I took the time to do a small script that will update the headers of the files to the current version of OF, and I thought to share it. It is more or less aesthetic, but as I use the files that I adapted to work in newer versions of OF (and that it had lost compatibility with the older ones...) I found updating the headers could be helpful. the script looks for all the files in the case, confirms that is an OF file by comparing the first and seventh line of the header (that is constant among the different versions of OF... or at least the ones I have used) Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
headerFile=$(find $FOAM_TUTORIALS -name "*controlDict*" |head -1) it is not a complicated thing to do but I thought that maybe someone will appreciate the share. in any case here it is (Attachment 84293): Code:
#!/bin/bash best regards! |
|
Quote:
the script I uploaded in the first post of the thread works correctly, at least for my needs, I only wanted to share it with the community for anyone that could give a use or might be interested in it. best regards. |
Quote:
Is there a script like this for updating source code files? EDIT: I see that foam-extend has a foamChangeCopyright script. |
Quote:
Hi Phil, This isn't something that we've needed much, since we like to preserve copyrights etc. However, on the few occasions where I've needed to make larger changes I have misc script snippets that I repurpose as needed. Cheers, /mark |
Thanks Mark
|
All times are GMT -4. The time now is 15:40. |