(file) Return to licensechange CVS log (file) (dir) Up to [Pegasus] / pegasus / mak

File: [Pegasus] / pegasus / mak / licensechange (download)
Revision: 1.4, Tue Dec 16 18:55:36 2008 UTC (15 years, 4 months ago) by kumpf
Branch: MAIN
CVS Tags: preBug9676, postBug9676, TASK_PEP317_1JUNE_2013, TASK-TASK_PEP362_RestfulService_branch-root, TASK-TASK_PEP362_RestfulService_branch-merged_out_from_trunk, TASK-TASK_PEP362_RestfulService_branch-merged_in_to_trunk, TASK-TASK_PEP362_RestfulService_branch-merged_in_from_branch, TASK-TASK_PEP362_RestfulService_branch-branch, TASK-PEP362_RestfulService-root, TASK-PEP362_RestfulService-merged_out_to_branch, TASK-PEP362_RestfulService-merged_out_from_trunk, TASK-PEP362_RestfulService-merged_in_to_trunk, TASK-PEP362_RestfulService-merged_in_from_branch, TASK-PEP362_RestfulService-branch, TASK-PEP348_SCMO-root, TASK-PEP348_SCMO-merged_out_to_branch, TASK-PEP348_SCMO-merged_out_from_trunk, TASK-PEP348_SCMO-merged_in_to_trunk, TASK-PEP348_SCMO-merged_in_from_branch, TASK-PEP348_SCMO-branch, TASK-PEP317_pullop-root, TASK-PEP317_pullop-merged_out_to_branch, TASK-PEP317_pullop-merged_out_from_trunk, TASK-PEP317_pullop-merged_in_to_trunk, TASK-PEP317_pullop-merged_in_from_branch, TASK-PEP317_pullop-branch, RELEASE_2_9_2-RC2, RELEASE_2_9_2-RC1, RELEASE_2_9_2, RELEASE_2_9_1-RC1, RELEASE_2_9_1, RELEASE_2_9_0-RC1, RELEASE_2_9_0, RELEASE_2_9-root, RELEASE_2_9-branch, RELEASE_2_14_1, RELEASE_2_14_0-RC2, RELEASE_2_14_0-RC1, RELEASE_2_14_0, RELEASE_2_14-root, RELEASE_2_14-branch, RELEASE_2_13_0-RC2, RELEASE_2_13_0-RC1, RELEASE_2_13_0-FC, RELEASE_2_13_0, RELEASE_2_13-root, RELEASE_2_13-branch, RELEASE_2_12_1-RC1, RELEASE_2_12_1, RELEASE_2_12_0-RC1, RELEASE_2_12_0-FC, RELEASE_2_12_0, RELEASE_2_12-root, RELEASE_2_12-branch, RELEASE_2_11_2-RC1, RELEASE_2_11_2, RELEASE_2_11_1-RC1, RELEASE_2_11_1, RELEASE_2_11_0-RC1, RELEASE_2_11_0-FC, RELEASE_2_11_0, RELEASE_2_11-root, RELEASE_2_11-branch, RELEASE_2_10_1-RC1, RELEASE_2_10_1, RELEASE_2_10_0-RC2, RELEASE_2_10_0-RC1, RELEASE_2_10_0, RELEASE_2_10-root, RELEASE_2_10-branch, PREAUG25UPDATE, POSTAUG25UPDATE, HPUX_TEST, HEAD, CIMRS_WORK_20130824, BeforeUpdateToHeadOct82011
Changes since 1.3: +4 -4 lines
BUG#: 8273
TITLE: Remove trailing space characters
DESCRIPTION: Remove meaningless whitespace.

#!/bin/bash

# Script to update Pegasus Licenses on all required modules in the pegasus CVS module
# Depends on license definition in
# right now cimmof.l and cimmof.lex.cpp have to be treated special.  These must be hand redone
# because the .l files do not handle the // comments at the beginning well and require them to
# be surounded by a /* */ sequence that we cannot do mechnaically.  Note that this also applies
# to the resulting cimmof_lex.cpp file.
# NOTE: The original updater was based on following the recursive Makefiles and using the
# filelists.  However, there are so many ifdefs in that and other issues that it was missing
# a significant number of files.  We elected to create a mechanism to scan all subdirectories
# of pegasus and make the changes with this script.

# Issues as of 2 Feb 06
# 1. pegasus/Schemas/Pegasus/CIM_Qualifiers25.mof - Should not be licensed by us
# 2. Not covering all .mof files in pegasus/src.
# 3. We are updating some of the Yacc output files and this is incorrect but
#    benign. However, we should not be doing this.
# There are still some issues that must be resolved manually so that after application of
# this script, the files that a) do not have licenses and b) have old licenses must be
# manually inspected and possibly some of these files manually fixed.

# move to start from Pegasus Root
cd $PEGASUS_ROOT
rm -f src/PEGASUS/Compiler/cimmof.l

LOGFILE=$PEGASUS_ROOT/licensechange.log
echo "License Change Started" > $LOGFILE

if [ ! -e '$PEGASUS_ROOT/doc/license.mak.txt' ]
then
     make -f $PEGASUS_ROOT/mak/license.mak create-make-license >> $LOGFILE
     make -f $PEGASUS_ROOT/mak/license.mak create-lex-license >> $LOGFILE
fi

# change all .h, .cpp, .c .java  and yacc files
# Absolute. Puts new licenses on if they do not exist
find \( -name *.h -o -name *.cpp -o -name *.c -o -name *.java -o -name *.y \) | grep -v InterfaceArchive | grep -v cimmof_lex.cpp | grep -v slp_client | while read filename ; do
     make -f $PEGASUS_ROOT/mak/license.mak fix-code-license FILENAME=${filename}  >> $LOGFILE
done
echo "Completed code files"  >> $LOGFILE

# do all lex files **.l) with the lex license. This license is special because it
# must use /* */ around the license for lex files.
find -name "*.l" | grep -v InterfaceArchive | grep -v slp_client | while read filename ; do
     make -f $PEGASUS_ROOT/mak/license.mak fix-lex-license FILENAME=${filename}  >> $LOGFILE
done
echo "Completed lex files"  >> $LOGFILE

# change all Make files and spec files, etc. with the make license (comment is # rather than //
find \( -name "*Makefile" -o -name *.mak -o -name "Makefile.*" -o -name "*.rc" -o -name "*.spec" -o -name "*.pl" \) | grep -v InterfaceArchive | while read filename ; do
     make -f $PEGASUS_ROOT/mak/license.mak fix-make-license FILENAME=${filename} >> licensechange.log
done
echo "Completed make files"  >> $LOGFILE

cd src
# Change mof files in the src directories. They are our files. For now change only thise
# that already have a license.
find -name *.mof | grep -v InterfaceArchive | while read filename ; do
     if grep '\/%2006\/' ${filename} 1> /dev/null
     then
        make -f $PEGASUS_ROOT/mak/license.mak fix-code-license FILENAME=${filename} >> licensechange.log
     fi
done
cd $PEGASUS_ROOT
echo "Completed Pegasus mof files"  >> $LOGFILE

# Change any files in the Schema Directories that have PG_ in the names.
cd $PEGASUS_ROOT/Schemas/Pegasus
find -name *.mof | grep -v InterfaceArchive | while read filename ; do
     make -f $PEGASUS_ROOT/mak/license.mak fix-code-license FILENAME=${filename} >> licensechange.log
done
echo "Completed Schemas/Pegasus mof files"  >> $LOGFILE
cd $PEGASUS_ROOT

cd $PEGASUS_ROOT/Schemas
# Also change any CIM_Schema files that have a Pegasus license on them. They are
# also our files. Note that this is conditional and only puts licenses on
# files that already have them.
find -name *.mof | grep -v InterfaceArchive | while read filename ; do
     if grep '\/%2006\/' ${filename} 1> /dev/null
     then
         make -f $PEGASUS_ROOT/mak/license.mak fix-code-license FILENAME=${filename} >> $LOGFILE
     fi
done
cd $PEGASUS_ROOT
echo "Completed Schemas mof files"  >> licensechange.log

# modify the various forms of readme files.
cd $PEGASUS_ROOT
find -name "README*.*" -o name "readme*.*" -o name "README*" | grep -v InterfaceArchive | while read filename ; do
      make -f $PEGASUS_ROOT/mak/license.mak fix-code-license FILENAME=${filename} >> licensechange.log
done

# Test for any remaining files that have the previous year license
cd $PEGASUS_ROOT
grep -r \/%2006\/ . >> $LOGFILE
echo "Completed"  >> $LOGFILE


No CVS admin address has been configured
Powered by
ViewCVS 0.9.2