[projects/pld-ftp-admin] Fix reporting time taken to generate freshness report

baggins baggins at pld-linux.org
Fri Jan 4 13:05:43 CET 2019


commit 48bc7762887dfa17bced14373a68753b93c795d2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Jan 4 20:55:14 2019 +0900

    Fix reporting time taken to generate freshness report

 wwwbin/freshness.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/wwwbin/freshness.sh b/wwwbin/freshness.sh
index 4646650..9fbdb2d 100755
--- a/wwwbin/freshness.sh
+++ b/wwwbin/freshness.sh
@@ -1,6 +1,12 @@
 #!/bin/sh
+
+export LC_ALL=C
+
 date > $HOME/www/freshness.txt.new
-/usr/bin/time -f '\nElapsed time: %E' $HOME/bin/ftp-freshness.py >> $HOME/www/freshness.txt.new 2>&1
-chmod 644 $HOME/www/freshness.txt.new
-mv $HOME/www/freshness.txt.new $HOME/www/freshness.txt
+/usr/bin/time -f '\nElapsed time: %E' -o $HOME/www/freshness.txt.time $HOME/bin/ftp-freshness.py >> $HOME/www/freshness.txt.new 2>/dev/null
 
+cat $HOME/www/freshness.txt.time >>$HOME/www/freshness.txt.new
+rm -f $HOME/www/freshness.txt.time
+
+mv $HOME/www/freshness.txt.new $HOME/www/freshness.txt
+chmod 644 $HOME/www/freshness.txt
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/4fa927dbf75145dd65de26f02fa89e05e7eee7b1



More information about the pld-cvs-commit mailing list