From: Zdeněk Šustr Date: Mon, 22 Mar 2010 16:22:48 +0000 (+0000) Subject: Recognize gSOAP License. X-Git-Tag: glite-jobid-api-c_R_1_0_2_1~11 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=6d099472cdfcb92c7c35aea0cd4d414da8ad44ed;p=jra1mw.git Recognize gSOAP License. --- diff --git a/org.glite.lb/egee_license_check.sh b/org.glite.lb/egee_license_check.sh index 15cc2d8..31ba6a8 100644 --- a/org.glite.lb/egee_license_check.sh +++ b/org.glite.lb/egee_license_check.sh @@ -95,15 +95,25 @@ sed --posix --regexp-extended \ -e 's:^[[:space:]]*(\#|//|/\*|\*|\%)[[:space:]]*::' \ -e 's:[[:space:]]*(\#|//|\*/|\*|\%)[[:space:]]*$::' \ -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | -tr -d '[\/[:space:]]'` +tr -d '[\/[:space:],]'` # is copyright present? -echo ${stripped_contents} | grep -q ${stripped_copyright} 2>/dev/null +echo ${stripped_contents} | grep -q "${stripped_copyright}" 2>/dev/null r1=$? +if [ "$r1" -eq "1" ]; then + # if not, try other known copyrights + echo ${stripped_contents} | grep -q "${stripped_gpl_copyright}" 2>/dev/null + r1=$? +fi # is license present? -echo ${stripped_contents} | grep -q ${stripped_license} 2>/dev/null +echo ${stripped_contents} | grep -q "${stripped_license}" 2>/dev/null r2=$? +if [ "$r2" -eq "1" ]; then + # if not, try other known licenses + echo ${stripped_contents} | grep -q "${stripped_gpl_license}" 2>/dev/null + r2=$? +fi ret=$(( r1 + r2 * 2 )) @@ -229,8 +239,15 @@ limitations under the License.' COPYRIGHT='Copyright (c) Members of the EGEE Collaboration. 2004-2010. See http://www.eu-egee.org/partners/ for details on the copyright holders.' -stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:]]'` -stripped_license=`printf "$LICENSE" | tr -d '[\/[:space:]]'` +GPLCOPYRIGHT='Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved.' +GPLLICENSE='The contents of this file are subject to the gSOAP Public License' + +stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` +stripped_license=`printf "$LICENSE" | tr -d '[\/[:space:],]'` + +stripped_gpl_copyright=`printf "$GPLCOPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` +stripped_gpl_license=`printf "$GPLLICENSE" | tr -d '[\/[:space:],]'` + #ANSI C files echo Processing ANSI C files