Skip to content

Instantly share code, notes, and snippets.

@franher
Created November 23, 2017 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franher/d50433f8a282e093012a50c1ac9519a4 to your computer and use it in GitHub Desktop.
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)
#!/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