aboutsummaryrefslogtreecommitdiffstats
path: root/testing/aaudit/aaudit-refresh
blob: c2ff334b5941e849890f54f78a96a94138ddf02b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
if [ ! -f aaudit-hostname -o ! -f config -o ! -f description -o ! -d objects ]; then
	echo "run in the created git repository"
	exit 1
fi
IP="$(cat aaudit-hostname)"
if ! ssh root@"$IP" 'lbu package -' | gunzip | /usr/libexec/aaudit/aaudit-import-tar; then
	git branch --quiet -D import
	exit 1
fi
if ! git diff --quiet --exit-code master..import; then
	git diff --patch-with-stat master..import | /usr/libexec/aaudit/aaudit-emaildiff "$(cat description)"
	git branch --quiet --force master import
fi
git branch --quiet -D import
git gc --quiet --prune=now