summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-03 04:36:05 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-03 04:36:05 (EDT)
commit8cccff5322665d9c870f319f5122eeaa28331adc (patch)
tree6da6d0751ebd14de321d329cce2df73542426cd4 /src
parent8e459b36af624dce696c9ccd516a7ecbddb79fad (diff)
"Finish" oh-gencontrol (still rather ugly).
Diffstat (limited to 'src')
-rw-r--r--src/oh-gencontrol.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/oh-gencontrol.sh b/src/oh-gencontrol.sh
index 06e01d5..9b2718e 100644
--- a/src/oh-gencontrol.sh
+++ b/src/oh-gencontrol.sh
@@ -77,10 +77,9 @@ install_maintainer_scripts()
gen_conffiles()
{
if [ -d "${OH_SOURCE_DIR}/tmp/${pkg}.data/etc" ]; then
- >"${OH_SOURCE_DIR}/tmp/${pkg}.control/conffiles"
find "${OH_SOURCE_DIR}/tmp/${pkg}.data/etc" -type f | \
sed "^@"${OH_SOURCE_DIR}/tmp/${pkg}.data"@@" \
- >>"${OH_SOURCE_DIR}/tmp/${pkg}.control/conffiles"
+ >"${OH_SOURCE_DIR}/tmp/${pkg}.control/conffiles"
if [ -z "$(head -n 1 \
"${OH_SOURCE_DIR}/tmp/${pkg}.control/conffiles")" ]; then
rm -f "${OH_SOURCE_DIR}/tmp/${pkg}.control/conffiles"
@@ -92,7 +91,15 @@ gen_conffiles()
gen_md5sums()
{
- :
+ find "${OH_SOURCE_DIR}/tmp/${pkg}.data" -type f | sort | xargs md5sum | \
+ sed "^@"${OH_SOURCE_DIR}/tmp/${pkg}.data"@@" \
+ >"${OH_SOURCE_DIR}/tmp/${pkg}.control/md5sums"
+ if [ -z "$(head -n 1 \
+ "${OH_SOURCE_DIR}/tmp/${pkg}.control/md5sums")" ]; then
+ rm -f "${OH_SOURCE_DIR}/tmp/${pkg}.control/md5sums"
+ else
+ chmod 644 "${OH_SOURCE_DIR}/tmp/${pkg}.control/md5sums"
+ fi
}
main "${@}"