aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-08-11 16:59:17 +0000
committermerakor <cem@ckyln.com>2020-08-11 16:59:17 +0000
commit378477e6eb108e021cf3b2acf4e5f366c56f60a6 (patch)
tree649a8b8dbb3140abff7b4d479c9ec8e0d91f412f
parent945f667f619272ce50ab7cb3676874587eeb870c (diff)
downloadcpt-378477e6eb108e021cf3b2acf4e5f366c56f60a6.tar.gz
pkg_build(): add the modified build to the package database.
FossilOrigin-Name: 60be60af88750bddc673a7e7df24f6157e14f0b4e12563bafae5c38f5918f01f
-rw-r--r--src/cpt-lib4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index 092a515..1d77016 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -751,6 +751,10 @@ pkg_build() {
# This acts as the database entry.
cp -LRf "$repo_dir" "$pkg_dir/$pkg/$pkg_db/"
+ # Copy the modified build file to the package directory.
+ diff "$pkg_dir/build" .build.cpt > "$pkg_dir/$pkg/$pkg_db/build" > "$pkg_dir/$pkg/$pkg_db/build.diff"
+ [ -s "$pkg_dir/$pkg/$pkg_db/build.diff" ] || rm -f "$pkg_dir/$pkg/$pkg_db/build.diff"
+
# We never ever want this. Let's end the endless conflicts
# and remove it.
find "$pkg_dir/$pkg" -name charset.alias -exec rm -f {} +