diff options
author | Sam Bingner <sam@bingner.com> | 2018-12-12 12:02:10 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-12-12 12:11:28 -1000 |
commit | 2e43ae2b0a75cf1134a70eafcb205689c5413496 (patch) | |
tree | a605a2d98b2c0ef3554973296d577de434bb33a1 | |
parent | 312b36667d9a63b35c756130d204b9248629bd76 (diff) |
Reset build revision if data version increases
-rwxr-xr-x | make.sh | 3 | ||||
-rwxr-xr-x | package.sh | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -224,6 +224,9 @@ find "${PKG_DEST}" -type f -name '*.a' -print0 | while read -r -d $'\0' bin; do "${PKG_BASE}/util/arid" "${bin}" done +if [[ -f "${PKG_STAT}/data-ver" ]] && dpkg --compare-versions $(cat "${PKG_DATA}/_metadata/version") gt $(cat "${PKG_STAT}/data-ver"); then + rm "${PKG_STAT}/dest-ver" +fi cp -aL "${PKG_DATA}/_metadata/version" "${PKG_STAT}/data-ver" echo "${PKG_HASH}" >"${PKG_STAT}/data-md5" diff --git a/package.sh b/package.sh index 2d683a8ba..24ccad70d 100755 --- a/package.sh +++ b/package.sh @@ -11,7 +11,6 @@ export PKG_MAKE=$0 export PKG_NAME=${1%_} export PKG_BASE=$(realpath "$(dirname "$0")") -source "${PKG_BASE}/helper.sh" # when running fakeroot, we shouldn't use the previous build result # as we don't have the fakeroot session info anymore @@ -22,6 +21,8 @@ else ./remake.sh "${PKG_NAME}" fi +source "${PKG_BASE}/helper.sh" + pkg: mkdir -p /DEBIAN ./control.sh "${PKG_NAME}" control >"$(pkg_ /DEBIAN/control)" |