build_package.sh: Fix permissions before creating package

parent 895d3f73
......@@ -20,6 +20,20 @@ function showHelp() {
}
# The DEBIAN dir and post/pre inst/rm files should have the right
# permissions
function fixPerms() {
local pkg=$1
controlDir="$REPOROOT/$pkg/package/DEBIAN"
chmod 0755 $controlDir
for file in preinst prerm postinst postrm; do
if [ -f "$controlDir/$file" ]; then
chmod 0775 "$controlDir/$file"
fi
done
}
# This function is used to keep all the packages with their AUTHORS and
# COPYING files up to date.
function copyDoc() {
......@@ -97,6 +111,7 @@ function createPackage() {
local ret=0
fixPerms $pkg
fakeroot dpkg -b $REPOROOT/$pkg/package/ $PACKAGESDEST/
return $?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment