From 8cccff5322665d9c870f319f5122eeaa28331adc Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 03 Aug 2012 04:36:05 -0400 Subject: "Finish" oh-gencontrol (still rather ugly). --- (limited to 'src') 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 "${@}" -- cgit v0.9.1