Created
November 23, 2017 09:19
-
-
Save franher/d50433f8a282e093012a50c1ac9519a4 to your computer and use it in GitHub Desktop.
Add a license header for all the js files under ./src folder (recursively)
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 | |
for i in $(find ./src -name '*.js' ); | |
do | |
if ! grep -q Copyright "$i" | |
then | |
echo "$i" | |
cat license-header.txt "$i" > "$i".new && mv "$i".new "$i" | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment