Skip to content

Commit

Permalink
change license file to add copyright holder name and date
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejice Jacob committed May 3, 2017
1 parent d8a7239 commit d7ef118
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion setup/add_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
license_file=""
source_type=""
dir=$(pwd)
prog="foobar"

function parse_opts
{
OPTIND=1
echo "options = " $*
while getopts ":chd:f:" options ;
while getopts ":chd:f:l:" options ;
do
case $options in
f) license_file="$OPTARG" ;;
c) source_type="[ch]" ; lang="c" ;;
d) dir="$OPTARG" ;;
l) prog="$OPTARG" ;;
h) echo "add license text to the top of source" ;
echo " options :";
echo " -f ... license file to read text from" ;
echo " -d ... directory to recursively search" ;
echo " -c ... find and add license to .c and .h files" ;
echo " -l ... name of program"
exit ;;
:) echo "option -$OPTARG requires argument" ;;
?) echo "invalid option -$OPTARG" ;;
Expand All @@ -34,7 +37,9 @@ function add_license
do
if ! grep -iq Copyright $file ;
then
echo "adding license in ${license_file} ==> ${file}"
cat ${license_file} ${file} > ${file}.new && mv ${file}.new ${file}
sed -i -e "s/Foobar/$prog/g" $file
fi
done
}
Expand Down
7 changes: 6 additions & 1 deletion setup/source_gplv2_copyright.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
This program is a set of examples about how to use openCL for use in
heterogeneous programs
Copyright (C) 2017 Dejice Jacob


This file is part of Foobar.

Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
Expand Down

0 comments on commit d7ef118

Please sign in to comment.