aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2022-12-14 10:37:19 +0100
committerMatěj Cepl <mcepl@cepl.eu>2022-12-14 10:37:19 +0100
commit15fb74ea27ab4f012a3afa9e221c32c5b0883ff8 (patch)
tree363b70cd5007c0134a0a970ee64721c89723e960
parentd0a5e1e8ec013dc6c8f6ef28c7481aec5b8416bf (diff)
downloadtime-of-build-15fb74ea27ab4f012a3afa9e221c32c5b0883ff8.tar.gz
Clean up the script.
-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) ))