summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-08-31 14:22:08 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-09-01 13:14:12 -0500
commita7b6d5a4928d3eb9f9ab83c5d604dc15973f8026 (patch)
tree629a26290e4f94e28c71b38367ec7f439f5f0c86
parentbaa97280c089cdedfa1d25662d85ebcecece452d (diff)
downloadtalos-hostboot-a7b6d5a4928d3eb9f9ab83c5d604dc15973f8026.tar.gz
talos-hostboot-a7b6d5a4928d3eb9f9ab83c5d604dc15973f8026.zip
Add copyright_check to hb.
Change-Id: I45ef334d4f7a98ae9228444994ffb0bad470a9fd Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/291 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rwxr-xr-xsrc/build/tools/hb43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb
index cfe345c36..9b9d51392 100755
--- a/src/build/tools/hb
+++ b/src/build/tools/hb
@@ -1,4 +1,26 @@
#!/bin/sh
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/tools/hb $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or other-
+# wise divested of its trade secrets, irrespective of what has
+# been deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END
execute_in_sandbox()
{
@@ -127,6 +149,16 @@ hb_helptext()
echo " modules and generates a CSV output of the sizes of the text"
echo " and data sections of the modules."
;;
+ copyright_check)
+ echo " Topic 'copyright_check'"
+ echo
+ echo " Usage:"
+ echo " hb copyright_check"
+ echo
+ echo " Executes addCopyright.pl in validate mode against the most"
+ echo " recent commit in your repository to ensure the prologs are"
+ echo " all added properly."
+ ;;
customrc)
echo " Topic 'customrc'"
echo
@@ -156,7 +188,8 @@ hb_helptext()
echo " hb help [<cmd>|<topic>]"
echo
echo " Available Commands:"
- echo " workon, simsetup, prime, startsimics, rsync, objsizes"
+ echo " workon, simsetup, prime, startsimics, rsync, objsizes,"
+ echo " copyright_check"
echo
echo " Additional Help Topics:"
echo " customrc"
@@ -290,6 +323,11 @@ hb_objsizes()
sed "s/.*\///"
}
+hb_copyright_check()
+{
+ git diff HEAD~1 --name-only | xargs addCopyright.pl validate
+}
+
if [ 0 == $# ]; then
hb_helptext
exit -1
@@ -317,6 +355,9 @@ rsync)
objsizes)
hb_objsizes $*
;;
+copyright_check)
+ hb_copyright_check $*
+ ;;
*)
hb_helptext $*
exit -1
OpenPOWER on IntegriCloud