[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cross-project-issues-dev] p2 download stats ... again
|
FWIW, here's a simple awk script to add stats to the artifacts.xml file. You'll need to edit as appropriate.
Cheers,
Greg
BEGIN {FS = "'"}
/<repository name='PTP' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>/ { found = 1 }
/<artifact classifier='org.eclipse.update.feature' id='org.eclipse.ptp.core'/ { found = 2 }
/<artifact classifier='org.eclipse.update.feature' id='org.eclipse.rdt'/ { found = 3 }
/<artifact classifier='org.eclipse.update.feature' id='org.eclipse.photran'/ { found = 4 }
/<properties size='[0-9]+'>/ {
if (found > 0) {
print $1 "'" $2+1 "'" $3
if (found == 1) {
print " <property name='p2.statsURI' value='http://download.eclipse.org/stats/helios'/>"
}
if (found == 2) {
print " <property name='download.stats' value='org.eclipse.ptp.core_4.0'/>"
}
if (found == 3) {
print " <property name='download.stats' value='org.eclipse.ptp.rdt_4.0'/>"
}
if (found == 4) {
print " <property name='download.stats' value='org.eclipse.ptp.photran_6.0'/>"
}
found = 0
} else {
print
}
}
!/<properties size='[0-9]+'>/ { print }