This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/third-party/JsonQt/add-copyright-header.sh

14 lines
320 B
Bash
Raw Permalink Normal View History

2025-12-25 01:37:49 +05:00
#!/bin/sh
NOTICE_HEADER="/* LICENSE NOTICE"
TMPFILE=$(mktemp)
for file in $(find -name *.cpp -o -name *.h); do
if ! grep -q "$NOTICE_HEADER" "$file"; then
echo "$NOTICE_HEADER" > $TMPFILE
cat COPYING.HEADER >> $TMPFILE
echo "*/" >> $TMPFILE
cat "$file" >> $TMPFILE
cat $TMPFILE > "$file"
fi
done
rm $TMPFILE