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
|
#! /bin/bash
exec >&3
strip_md5sum() {
sed 's/^.* \+//' "$@"
}
print_changed_files() {
(cd / &&
strip_md5sum "$@" |
xargs md5sum 2>/dev/null | sort |
comm -3 - <(sort "$@")
) | strip_md5sum | sort -u
}
files_in_usrlocal() {
[ ! -d /usr/local/share/request-tracker4/ ] || [ `find /usr/local/share/request-tracker4/ -type f | wc -l` -gt 0 ] && echo -e "\nThere are locally modified files in /usr/local/share/request-tracker4/,\n these may (or may not) be the source of the problem.\n"
}
sumfile=/var/lib/dpkg/info/request-tracker4.md5sums
echo "Changed files:"
print_changed_files "$sumfile" | sed 's/^/ /'
files_in_usrlocal
|