#!/bin/sh

# redo_licenses -- recompute licenses.

SPECS=/usr/src/redhat/SPECS
BUILD=/usr/src/redhat/BUILD

cd $BUILD
for builddir in *
do
 specfile=`cat ${builddir}/ORIGINAL_SPEC_FILE | head -1`
 specfile=${SPECS}/$specfile
 echo "builddir=${builddir}, specfile=${specfile}"
 /root/extract_license "$builddir" "$specfile" > ${builddir}/PROGRAM_LICENSE
 license=`cat ${builddir}/PROGRAM_LICENSE | head -1`
 echo "   $license"

done

