gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 69/73: update plotter script


From: gnunet
Subject: [taler-grid5k] 69/73: update plotter script
Date: Tue, 14 Dec 2021 15:10:51 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit d2513305c569e3c67d489107d7d794c5cde280c1
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sun Dec 12 16:52:39 2021 +0100

    update plotter script
---
 additional/plots/plot.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/additional/plots/plot.sh b/additional/plots/plot.sh
index b89a516..12a1a17 100755
--- a/additional/plots/plot.sh
+++ b/additional/plots/plot.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 # Create plots from the grafana dashboard
+# $1: [optional] name of the experiment
 set -eu
 
 PLOTTER_DIR=plotter
@@ -33,6 +34,23 @@ else
   python3 plots.py --from=${FROM} --to=${TO}
 fi
 
-tar -czvf ../plots-${TO}.tar.gz plots
+NAME=${1:-${TO}}
+
+# Slugify the name
+NAME=$(\
+  echo "$NAME" | \
+  sed -r s/[~\^]+//g | \
+  sed -r s/[^a-zA-Z0-9]+/-/g | \
+  sed -r s/^-+\|-+$//g | \
+  tr A-Z a-z \
+)
+
+N=1
+while [ -f ../plots-${NAME}.tar.gz ]; do
+  NAME="${NAME}-${N}"
+  ((N++))
+done
+
+tar -czvf ../plots-${NAME}.tar.gz plots
 
 rm -rf plots 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]