summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 "${@}"