-
-
Save singchia/a734407bcd00c38de6f68db0f3849d2b to your computer and use it in GitHub Desktop.
Add a copyright license header to all CPP and H files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -r -d '' license <<-"EOF" | |
/* Copyright (c) 2010-2017, Delft University of Technology | |
* All rights reserved | |
* | |
* This file is part of the Tudat. Redistribution and use in source and | |
* binary forms, with or without modification, are permitted exclusively | |
* under the terms of the Modified BSD license. You should have received | |
* a copy of the license with this file. If not, please or visit: | |
* http://tudat.tudelft.nl/LICENSE. | |
*/ | |
EOF | |
files=$(grep -rL "Copyright (c) 2010-2017, Delft University of Technology" * | grep "\.h\|\.cpp") | |
for f in $files | |
do | |
echo -e "$license" > temp | |
cat $f >> temp | |
mv temp $f | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment