aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtime-of-build.sh9
1 files changed, 1 insertions, 8 deletions
diff --git a/time-of-build.sh b/time-of-build.sh
index fde7689..825a065 100755
--- a/time-of-build.sh
+++ b/time-of-build.sh
@@ -7,16 +7,9 @@ tempfile="$(mktemp -t time-of-build-XXXXXX)"
trap 'rm -rf "$tempfile"' EXIT
osc rbl $projname $pkg openSUSE_Tumbleweed x86_64 >$tempfile
+# begtime="Tue Dec 13 23:50:13 UTC 2022"
begstr="$(sed -E -n -e '/started "build/s/^.*at (.*)\.$/\1/p' $tempfile)"
endstr="$(sed -E -n -e '/(finished|failed) "build/s/^.*at (.*)\.$/\1/p' $tempfile)"
begtime="$(date --date "$begstr" +%s)"
endtime="$(date --date "$endstr" +%s)"
echo -e "$(( $endtime - $begtime ))\t$pkg"
-
-# begtime="Tue Dec 13 23:50:13 UTC 2022"
-# endtime="Tue Dec 13 23:50:27 UTC 2022"
-# date --date '2017-08-17 04:00:01' +%s # "1502938801"
-# date --date '2017-08-17 04:00:01' +%s
-# date --date "$begtime" %s
-# date --date "$begtime" +%s
-# echo $(( $(date --date "$endtime" +%s) - $(date --date "$begtime" +%s) ))