-
Notifications
You must be signed in to change notification settings - Fork 0
/
triage.sh
executable file
·60 lines (45 loc) · 1.16 KB
/
triage.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
## ---------------------------------------------------------------------------
## 1) Copy voltha.docs and run make html
## ---------------------------------------------------------------------------
set -euo pipefail
function precheck()
{
local repo="$1"; shift
grep -r 'sphinx-multiversion' "$repo"
}
##----------------##
##---] MAIN [---##
##----------------##
ccyymmdd="$(date '+%Y%m%d%H%M%S')"
work="tmp"
repo='voltha-docs'
here=$(realpath --canonicalize-existing .)
root="${here%/*}"
logdir="$here/.errors/$repo/$ccyymmdd"
ts_dir="${here}/${work}/.ts"
mkdir -vp "$ts_dir"
mkdir -vp "$work" "$logdir"
pushd "$work" >/dev/null
/bin/rm -fr "$repo"
mkdir -vp "$repo"
/bin/ls
# make -f ../makefile "$repo"
rsync -r --checksum "${root}/voltha-docs/." voltha-docs/.
# cp requirements.txt "$repo"
# /bin/rm -f "$repo/requirements.txt"
# touch "$repo/requirements.txt"
# cp requirements.txt "$repo"
echo
echo "** PWD: $(/bin/pwd)"
echo
precheck "$repo"
ts="${ts_dir}/$repo"
date > "$ts"
pushd "$repo" >/dev/null
make html 2>&1 | tee "$logdir/html.log"
pip freeze
find . -newer "$ts" -ls
popd >/dev/null # repo
popd >/dev/null
# [EOF]