summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-27 21:34:06 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-27 21:34:06 (EST)
commit5746c539f77acdcd5a895aec36b8a1ac509b3479 (patch)
tree5353de49ef59d1c3e4e607fa0a63c068aff05528 /src
parent09f2e004228ad53ce4730fc64b42e581e2b9427a (diff)
Generate md5sums list.
Diffstat (limited to 'src')
-rw-r--r--src/oh-gencontrol9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/oh-gencontrol b/src/oh-gencontrol
index 03acc3d..6505920 100644
--- a/src/oh-gencontrol
+++ b/src/oh-gencontrol
@@ -142,6 +142,15 @@ gen_control_bin()
chmod 644 ${control_dir}/conffiles
fi
fi
+
+ # MD5 checksums.
+ find ${data_dir} -type f | sed "@^${data_dir}@@" | sort | xargs md5sum \
+ > ${control_dir}/md5sums
+ if [ -z "$(cat ${control_dir}/md5sums)" ]; then
+ rm -f ${control_dir}/md5sums
+ else
+ chmod 644 ${control_dir}/md5sums
+ fi
}
if [ ${#} -eq 0 ]; then