few updates

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-04-23 03:04:13 +00:00
parent 36c061b0de
commit a36f061af8
1 changed files with 9 additions and 4 deletions

View File

@ -20,7 +20,6 @@ copyFile()
processPom()
{
echo processing POM: $1
contents=`cat $1 | tr '\n' ' ' | sed 's#<parent>.*</parent>##m' | sed 's#<dependencies>.*</dependencies>##m'`
groupId=`echo $contents | grep '<groupId>' | sed 's#^.*<groupId>##' | sed 's#</groupId>.*$##'`
artifactId=`echo $contents | grep '<artifactId>' | sed 's#^.*<artifactId>##' | sed 's#</artifactId>.*$##'`
@ -54,8 +53,6 @@ processPom()
exit 1
fi
echo $groupId : $artifactId : $version
slashedGroupId=`echo $groupId | sed 's#\.#/#g'`
tsVersion=`echo $1 | sed "s#^.*/$artifactId-##" | sed 's#.pom$##'`
@ -64,27 +61,35 @@ processPom()
oldTxtVersion=$slashedGroupId/$artifactId/$version/$artifactId-$version.version.txt
newTxtVersion=$slashedGroupId/$artifactId-$version.version.txt
banner=0
if [ ! -f $oldPath ]; then
copyFile $1 $oldPath
banner=1
fi
if [ ! -f $newPath ]; then
copyFile $1 $newPath
banner=1
fi
if [ -f $newTxtVersion ]; then
if [ ! -f $oldTxtVersion ]; then
copyFile $newTxtVersion $oldTxtVersion
banner=1
fi
fi
if [ -f $oldTxtVersion ]; then
if [ ! -f $newTxtVersion ]; then
copyFile $oldTxtVersion $newTxtVersion
banner=1
fi
fi
echo ==================================================
if [ $banner -eq 1 ]; then
echo ==================================================
fi
}
find . -mtime -1 -name '*.pom' | xargs grep -l '<packaging>pom</packaging>' | while read pom