[tor-commits] [metrics-web/master] Replace run-web and copy scripts with ant tasks.
karsten at torproject.org
karsten at torproject.org
Wed Dec 20 08:41:23 UTC 2017
commit 4ea3758cfffa70a63c5721185f4b110d131cc663
Author: iwakeh <iwakeh at torproject.org>
Date: Mon Dec 4 11:14:29 2017 +0000
Replace run-web and copy scripts with ant tasks.
---
build.xml | 32 ++++++++++++++++++++++++++++++++
run-web.sh | 6 ------
shared/bin/99-copy-stats-files.sh | 15 ---------------
3 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/build.xml b/build.xml
index 78f17d0..ed2125a 100644
--- a/build.xml
+++ b/build.xml
@@ -81,6 +81,19 @@
<property name="modulebase" value="${prepare.deployment}/modules" />
<!-- Operational tasks. -->
+ <target name="run-web-prepare" depends="init" >
+ <mkdir dir="${prepare.deployment}/modules" />
+ <antcall target="collectdescs" />
+ <antcall target="connbidirect" />
+ <antcall target="onionperf" />
+ <antcall target="legacy" />
+ <antcall target="advbwdist" />
+ <antcall target="hidserv" />
+ <antcall target="clients" />
+ <antcall target="webstats" />
+ <antcall target="make-data-available" />
+ </target>
+
<target name="collectdescs" >
<property name="module.name" value="collectdescs" />
<antcall target="run-java" />
@@ -237,6 +250,25 @@
</exec>
</target>
+ <target name="make-data-available" >
+ <property name="statsdir" value="${metrics-web.deployment.base}/shared/stats/" />
+ <mkdir dir="${statsdir}" />
+ <property name="rdatadir" value="${metrics-web.deployment.base}/shared/RData" />
+ <mkdir dir="${rdatadir}" />
+ <copy todir="${statsdir}" >
+ <fileset dir="${modulebase}/onionperf/stats" includes="*.csv" />
+ <fileset dir="${modulebase}/connbidirect/stats" includes="connbidirect2.csv" />
+ <fileset dir="${modulebase}/advbwdist/stats" includes="advbwdist.csv" />
+ <fileset dir="${modulebase}/legacy/stats" includes="*.csv" />
+ <fileset dir="${modulebase}/hidserv/stats" includes="hidserv.csv" />
+ <fileset dir="${modulebase}/clients/stats"
+ includes="clients*.csv userstats-combined.csv" />
+ <fileset dir="${modulebase}/webstats/stats" includes="webstats.csv" />
+ <fileset dir="${modulebase}/clients/RData" includes="*.RData" />
+ <fileset dir="${modulebase}/webstats/RData" includes="*.RData" />
+ </copy>
+ </target>
+
<!-- Support tasks for operation -->
<target name="run-java">
<echo message="Running java module ${module.name} ... " />
diff --git a/run-web.sh b/run-web.sh
deleted file mode 100755
index bd0bb5c..0000000
--- a/run-web.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-for i in $(ls shared/bin/[0-9]* | sort); do
- echo `date` "Running $i."
- ./$i
-done
-
diff --git a/shared/bin/99-copy-stats-files.sh b/shared/bin/99-copy-stats-files.sh
deleted file mode 100755
index cc0c9fc..0000000
--- a/shared/bin/99-copy-stats-files.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-mkdir -p shared/stats
-cp -a modules/onionperf/stats/*.csv shared/stats/
-cp -a modules/legacy/stats/*.csv shared/stats/
-cp -a modules/connbidirect/stats/connbidirect2.csv shared/stats/
-cp -a modules/advbwdist/stats/advbwdist.csv shared/stats/
-cp -a modules/hidserv/stats/hidserv.csv shared/stats/
-cp -a modules/clients/stats/clients*.csv shared/stats/
-cp -a modules/clients/stats/userstats-combined.csv shared/stats/
-cp -a modules/webstats/stats/webstats.csv shared/stats/
-
-mkdir -p shared/RData
-cp -a modules/clients/RData/*.RData shared/RData/
-cp -a modules/webstats/RData/*.RData shared/RData/
-
More information about the tor-commits
mailing list