From 6b9ad41f4175aa1a9601080a837737c351d60d84 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Thu, 18 Aug 2011 19:12:02 -0400 Subject: sha256sums target should follow sha256's format --- dm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 $@ -- cgit v1.2.3