File: gime-summary-json.sh

package info (click to toggle)
libreswan 5.2-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 81,632 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (32 lines) | stat: -rwxr-xr-x 541 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

if test $# -ne 3 ; then
    cat >> /dev/stderr <<EOF

Usage:

    $0 <rutdir> <commit> <directory>

Generate enough of a summary.json file for the web page to build a
TestResult().  Note that the times are set to zero aka epoch.

EOF
    exit 1
fi

bindir=$(realpath $(dirname $0))
rutdir=$1 ; shift
commit=$1 ; shift
directory=$1 ; shift

jq --null-input \
   --arg commit "${commit}" \
   --arg directory "${directory}" \
   '
{
  start_time: null,
  directory: $directory,
  current_time: null,
  total: 0,
  hash: $commit,
}'