[Kimchi-devel] [PATCH] [Wok 2/6] Add script to verify IBM copyright date
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Feb 8 20:04:17 UTC 2016
Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
IBM-license-blacklist | 97 +++++++++++++++++++++++++++++++++++++++++++++
check-IBM-license-header.sh | 41 +++++++++++++++++++
2 files changed, 138 insertions(+)
create mode 100644 IBM-license-blacklist
create mode 100755 check-IBM-license-header.sh
diff --git a/IBM-license-blacklist b/IBM-license-blacklist
new file mode 100644
index 0000000..133f119
--- /dev/null
+++ b/IBM-license-blacklist
@@ -0,0 +1,97 @@
+.gitignore
+.gitmodules
+ABOUT-NLS
+AUTHORS
+CONTRIBUTE.md
+COPYING
+COPYING.ASL2
+COPYING.LGPL
+ChangeLog
+INSTALL
+VERSION
+build-aux/config.rpath
+build-aux/genChangelog
+build-aux/pkg-version
+config.rpath
+contrib/DEBIAN/control.in
+contrib/wok.spec.fedora.in
+contrib/wok.spec.suse.in
+contrib/wokd.logrotate.in
+contrib/wokd.service.fedora
+docs/API/.*.md
+docs/.*.md
+docs/wokd.8.in
+m4/.*.m4
+po/LINGUAS
+po/Makefile.in.in
+po/Makevars
+po/POTFILES.in
+po/wok.pot
+src/firewalld.xml
+src/wok.conf.in
+src/wok/API.json
+src/wok/plugins/sample/API.json
+src/wok/plugins/sample/po/LINGUAS
+src/wok/plugins/sample/po/Makefile.in.in
+src/wok/plugins/sample/po/Makevars
+src/wok/plugins/sample/po/POTFILES.in
+src/wok/plugins/sample/po/sample.pot
+src/wok/plugins/sample/sample.conf.in
+src/wok/plugins/sample/ui/config/tab-ext.xml
+src/wok/plugins/sample/ui/pages/help/en_US/.*.html
+ui/base64/README.md
+ui/base64/jquery.base64.js
+ui/css/fontawesome/fontawesome.css
+ui/css/opensans/opensans.css
+ui/css/src/vendor/bootstrap-sass/LICENSE
+ui/css/src/vendor/bootstrap-sass/bootstrap/.*.scss
+ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/.*.scss
+ui/css/src/vendor/compass-mixins/LICENSE
+ui/css/src/vendor/compass-mixins/lib/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/css3/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/functions/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/layout/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/reset/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/typography/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/typography/links/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/typography/lists/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/typography/text/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/color/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/links/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/sprites/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/tables/.*.scss
+ui/css/src/vendor/compass-mixins/lib/compass/utilities/text/.*.scss
+ui/images/theme-default/.*.svg
+ui/libs/bootstrap-editable/LICENSE
+ui/libs/bootstrap-editable/dist/css/bootstrap-editable.css
+ui/libs/bootstrap-editable/dist/js/bootstrap-editable.min.js
+ui/libs/bootstrap-select/LICENSE
+ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
+ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
+ui/libs/bootstrap-switch/LICENSE
+ui/libs/bootstrap-switch/dist/css/bootstrap-switch.min.css
+ui/libs/bootstrap-switch/dist/js/bootstrap-switch.min.js
+ui/libs/bootstrap/LICENSE
+ui/libs/bootstrap/bootstrap.min.js
+ui/libs/es5-shim/LICENSE
+ui/libs/es5-shim/es5-shim.min.js
+ui/libs/jquery-bootgrid/LICENSE
+ui/libs/jquery-bootgrid/dist/css/jquery.bootgrid.min.css
+ui/libs/jquery-bootgrid/dist/js/jquery.bootgrid.min.js
+ui/libs/jquery-i18n/LICENSE
+ui/libs/jquery-i18n/jquery.i18n.min.js
+ui/libs/jquery-ui/LICENSE
+ui/libs/jquery-ui/jquery-ui-i18n.min.js
+ui/libs/jquery-ui/jquery-ui.min.js
+ui/libs/jquery-ui/themes/base/jquery-ui.min.css
+ui/libs/jquery/LICENSE
+ui/libs/jquery/jquery.min.js
+ui/libs/list-js/LICENSE
+ui/libs/list-js/list.min.js
+ui/libs/typeahead/LICENSE
+ui/libs/typeahead/typeahead.bundle.min.js
+ui/robots.txt
diff --git a/check-IBM-license-header.sh b/check-IBM-license-header.sh
new file mode 100755
index 0000000..99fd327
--- /dev/null
+++ b/check-IBM-license-header.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+IGNORE_FILES=" "
+if [ -f ./IBM-license-blacklist ]; then
+ IGNORE_FILES=$(cat ./IBM-license-blacklist)
+fi
+
+for FILE in $(git grep --cached -Il '' | grep -v "$IGNORE_FILES" | grep -v check-IBM-license-header.sh | grep -v IBM-license-blacklist)
+do
+
+ grep -q "Copyright IBM.*Corp.*" $FILE
+ if [ $? -ne 0 ]; then
+ echo "License header missing for" $FILE
+ fi
+
+ FIRST=$(git log --pretty=format:%cd --date=short $FILE | cut -d - -f 1 | sort | uniq | head -1)
+ LAST=$(git log --pretty=format:%cd --date=short $FILE | cut -d - -f 1 | sort | uniq | tail -1)
+ if [ $FIRST -eq $LAST ]; then
+ sed -i s/" Copyright.*IBM.*"/" Copyright IBM Corp, "$FIRST/g $FILE
+ else
+ sed -i s/" Copyright.*IBM.*"/" Copyright IBM Corp, "$FIRST"-"$LAST/g $FILE
+ fi
+done
--
2.5.0
More information about the Kimchi-devel
mailing list