diff options
author | Jay Freeman <saurik@saurik.com> | 2008-02-26 11:27:25 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-02-26 11:27:25 +0000 |
commit | eb44881ecee1df7c411da14300f1c2a3037c7f95 (patch) | |
tree | c862912990328431f9ca40a5e49cd46ae296a3cc | |
parent | 90d1026509833985c3cb1231c35aacf769f2e8dd (diff) |
Added support for postinst and prerm scripts to packaging system.
git-svn-id: http://svn.telesphoreo.org/trunk@106 514c082c-b64e-11dc-b46d-3d985efe055d
-rwxr-xr-x | package.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/package.sh b/package.sh index 6020d464f..e43b06389 100755 --- a/package.sh +++ b/package.sh @@ -17,7 +17,14 @@ export PKG_BASE=$(realpath "$(dirname "$0")") pkg: mkdir -p /DEBIAN ./control.sh "${PKG_NAME}" control >"$(pkg_ /DEBIAN/control)" -#cp -a "${PKG_DATA}"/_metadata/postinst "$(pkg_ /DEBIAN)" + +if [[ -e "${PKG_DATA}"/_metadata/postinst ]]; then + cp -a "${PKG_DATA}"/_metadata/postinst "$(pkg_ /DEBIAN)" +fi + +if [[ -e "${PKG_DATA}"/_metadata/prerm ]]; then + cp -a "${PKG_DATA}"/_metadata/prerm "$(pkg_ /DEBIAN)" +fi export PKG_HASH=$(util/catdir.sh "${PKG_DEST}" | md5sum | cut -d ' ' -f 1) echo "hashed dest ${PKG_NAME} to: ${PKG_HASH}" |