Last active
July 10, 2023 18:36
-
-
Save magnific0/38ca675e69e16be5d6ee3e692a2a1c5f to your computer and use it in GitHub Desktop.
Add a copyright license header to all CPP and H files
This file contains hidden or 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 | |
typo "rigths" ;)
You're right :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typo "rigths" ;)