File: dump_rdiff-backup.sh

package info (click to toggle)
rdiff-backup 2.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,640 kB
  • sloc: python: 24,129; javascript: 9,512; sh: 1,230; ansic: 580; makefile: 36
file content (26 lines) | stat: -rwxr-xr-x 649 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
#!/bin/sh
# call with the name of the rdiff-backup repository to analyze

if [ -z "$1" ]
then
	echo "Call $0 <reponame>" >&2
	exit 1
fi

REPOPATH="${1}"
REPONAME=$(basename "${REPOPATH}")

OUT_FILE="${TMPDIR:-/tmp}/${REPONAME}"
HTML_FILE="${OUT_FILE}.html"
JSON_FILE="${OUT_FILE}.json"

tree -CH "${REPONAME}" --nolinks \
	-apugsD --timefmt='%Y-%M-%d/%T' --inodes --device --dirsfirst \
	"${REPOPATH}" -o "${HTML_FILE}"
tree -J \
	-apugsD --timefmt='%s' --inodes --device --dirsfirst \
	"${REPOPATH}" -o "${JSON_FILE}"

gzip --verbose --force "${HTML_FILE}" "${JSON_FILE}"

echo "Attach '${HTML_FILE}.gz' and '${JSON_FILE}.gz' to your GitHub issue"