1#!/bin/sh 2 3# redo_licenses -- recompute licenses. 4 5# This is part of SLOCCount, a toolsuite that counts 6# source lines of code (SLOC). 7# Copyright (C) 2001-2004 David A. Wheeler. 8# 9# This program is free software; you can redistribute it and/or modify 10# it under the terms of the GNU General Public License as published by 11# the Free Software Foundation; either version 2 of the License, or 12# (at your option) any later version. 13# 14# This program is distributed in the hope that it will be useful, 15# but WITHOUT ANY WARRANTY; without even the implied warranty of 16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17# GNU General Public License for more details. 18# 19# You should have received a copy of the GNU General Public License 20# along with this program; if not, write to the Free Software 21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22# 23# To contact David A. Wheeler, see his website at: 24# http://www.dwheeler.com. 25# 26# 27 28SPECS=/usr/src/redhat/SPECS 29BUILD=/usr/src/redhat/BUILD 30 31cd $BUILD 32for builddir in * 33do 34 specfile=`cat ${builddir}/ORIGINAL_SPEC_FILE | head -1` 35 specfile=${SPECS}/$specfile 36 echo "builddir=${builddir}, specfile=${specfile}" 37 /root/extract_license "$builddir" "$specfile" > ${builddir}/PROGRAM_LICENSE 38 license=`cat ${builddir}/PROGRAM_LICENSE | head -1` 39 echo " $license" 40 41done 42 43