Added ability to add prerm, postinst scripts per package
This commit is contained in:
@@ -60,6 +60,25 @@ fi
|
||||
cp ../templates/control-$PACKAGENAME.template DEBIAN/control
|
||||
cp ../templates/conffiles-$PACKAGE.template DEBIAN/conffiles
|
||||
|
||||
if [ -e "../templates/prerm-$PACKAGE.template" ]; then
|
||||
echo "Adding $PACKAGE prerm script..."
|
||||
cp ../templates/prerm-$PACKAGE.template DEBIAN/prerm
|
||||
else
|
||||
if [ -e "DEBIAN/prerm" ]
|
||||
echo "Deleting old prerm script..."
|
||||
rm DEBIAN/prerm
|
||||
fi
|
||||
fi
|
||||
if [ -e "../templates/postinst-$PACKAGE.template" ]; then
|
||||
echo "Adding $PACKAGE postinst script..."
|
||||
cp ../templates/postinst-$PACKAGE.template DEBIAN/postinst
|
||||
else
|
||||
if [ -e "DEBIAN/postinst" ]
|
||||
echo "Deleting old postinst script..."
|
||||
rm DEBIAN/postinst
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Setting build number ($(cat ../../lastbuild/frontend/BuildIdentity.txt | tr -d ' \r'))..."
|
||||
sed -i "s/--BuildNumber--/$(cat ../../lastbuild/frontend/BuildIdentity.txt | tr -d ' \r')/" DEBIAN/control
|
||||
|
||||
|
||||
Reference in New Issue
Block a user