aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <ryanakca@kubuntu.org>2011-08-18 19:12:02 -0400
committerRyan Kavanagh <ryanakca@kubuntu.org>2011-08-25 07:43:07 -0400
commit6b9ad41f4175aa1a9601080a837737c351d60d84 (patch)
treece3c52abde11e83a5673830475d8e93d488074be
parentAdded default list of packages for Debian based systems (diff)
sha256sums target should follow sha256's format
Diffstat (limited to '')
-rwxr-xr-xdm12
1 files changed, 11 insertions, 1 deletions
diff --git a/dm b/dm
index 00df270..96ca35d 100755
--- a/dm
+++ b/dm
@@ -43,6 +43,8 @@ GLOBAL_FILES = \
get-val = $(shell awk '{if (match($$0, /$1/)) { print $$2 } }' $(SUBSTS_FILE))
+CURRENT_BRANCH = $(shell git branch --no-color | colrm 1 2)
+
SHA256 = $(call get-val,SHA256)
LOCAL_PASS = $(call get-val,LOCAL_PASS)
@@ -103,8 +105,16 @@ build/%: %
install: $(BUILD)
rsync -a build/ ~
-sha256sums: $(LOCAL_FILES) $(GLOBAL_FILES) dm
+sha256sums: .git/refs/heads/$(CURRENT_BRANCH)
$(SHA256) `git ls-files | grep -v $@` > $@
+ [ $(SHA256) = 'sha256' ] || awk '{ \
+ sum = $$1; \
+ $$1 = ""; \
+ # We want (filename), not ( filename). \
+ gsub(/^ /,""); \
+ print "SHA256 (" $$0 ") = " sum; \
+ }' $@ > $@.temp
+ mv $@.temp $@
sha256sums.asc: sha256sums
rm -f $@