3 # Copyright (c) 2010 Mia-Software
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Eclipse Public License v1.0
6 # which accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
11 # Ferenc Kovacs - Titan, Ericsson AB
13 XSLT_FILE
=.
/addDownloadStats.xsl
16 echo "usage: $0 <update_site_location>"
20 if [ ! -d $1 ] ; then echo "not a directory"; exit 1; fi
21 if [ ! -f $1/artifacts.jar
] ; then echo "artifacts.jar not found"; exit 1; fi
23 echo "Adding download stats to repository"
27 mv artifacts.xml artifacts.xml.original
28 if grep p2.statsURI artifacts.xml.original
; then echo "p2.statsURI already defined: exiting"; exit 1; fi
30 xsltproc
-o artifacts.xml
$XSLT_FILE artifacts.xml.original
31 for L
in `grep 'eclipsestats.php' artifacts.xml | cut -c 48- | rev | cut -c 4- | rev`; do
32 ln -s eclipsestats.php
/proj
/TTCN
/www
/ttcn
/root
/download
/eclipse_stats
/$L 2>/dev
/null
34 zip artifacts.jar artifacts.xml