From 25af40e8ad087b1c86a85b3075b8fd4c35d79a81 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 16 Aug 2011 21:16:41 -0400 Subject: Rename executable makefile to dm --- Makefile | 135 --------------------------------------------------------- dm | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sha256sums | 2 +- sha256sums.asc | 58 ++++++++++++------------- 4 files changed, 165 insertions(+), 165 deletions(-) delete mode 100755 Makefile create mode 100755 dm diff --git a/Makefile b/Makefile deleted file mode 100755 index f0c0d53..0000000 --- a/Makefile +++ /dev/null @@ -1,135 +0,0 @@ -#!gmake -f -SUBSTS_FILE=SUBSTS.local - -# Files that need changes to work locally or that contain sensitive -# information -LOCAL_FILES = \ - .imapfilter/config.lua \ - .mutt/accounts.rc \ - .netrc \ - .offlineimaprc \ - .xmonad/xmonad.hs \ - -# Files that are system independent. -# IMPORTANT: directories must have trailing slash -GLOBAL_FILES = \ - .Xdefaults \ - .config/nitrogen/ \ - .dzen/ \ - .gitconfig \ - .imapfilter/ \ - .inputrc \ - .local/share/wallpapers/ \ - .mailcheckrc \ - .mutt/ \ - .muttrc \ - .notmuch-config \ - .quiltrc-dpkg \ - .screenrc \ - .screenlayout/ \ - .signature \ - .vim/ \ - .vimrc \ - .xinitrc \ - .xmobarrc \ - .xmonad/ \ - .zsh/ \ - .zsh_logout \ - .zshrc \ - bin/ \ - -get-val = $(shell awk '{if (match($$0, /$1/)) { print $$2 } }' $(SUBSTS_FILE)) - -SHA256 = $(call get-val,SHA256) - -LOCAL_PASS = $(call get-val,LOCAL_PASS) -GMAIL_PASS = $(call get-val,GMAIL_PASS) -QUEENSU_PASS = $(call get-val,QUEENSU_PASS) -PM_EMAIL = $(call get-val,PM_EMAIL) -SCREENLAYOUT = $(call get-val,SCREENLAYOUT) -XMONAD_DZEN_W = $(call get-val,XMONAD_DZEN_W) -XMONAD_DZEN_X = $(call get-val,XMONAD_DZEN_X) -XMONAD_DZEN_Y = $(call get-val,XMONAD_DZEN_Y) - -# This target relies on GLOBAL_FILES being before LOCAL_FILES so that the -# build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES. -BUILD = $(patsubst %,build/%,$(GLOBAL_FILES) $(LOCAL_FILES)) - -build: $(BUILD) - -build/.offlineimaprc: .offlineimaprc $(SUBSTS_FILE) - [ -d build ] || mkdir build - sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ - -e 's/GMAIL_PASS/$(GMAIL_PASS)/g' \ - -e 's/QUEENSU_PASS/$(QUEENSU_PASS)/g' $< > $@ - -build/.imapfilter/config.lua: .imapfilter/config.lua $(SUBSTS_FILE) - [ -d build/.imapfilter ] || mkdir -p build/.imapfilter - sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ - -e 's/PM_EMAIL/$(PM_EMAIL)/g' $< > $@ - -build/.netrc: .netrc $(SUBSTS_FILES) - [ -d build ] || mkdir build - sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' $< > $@ - -build/.mutt/accounts.rc: .mutt/accounts.rc $(SUBSTS_FILE) - [ -d build/.mutt ] || mkdir -p build/.mutt - sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ - -e 's/GMAIL_PASS/$(GMAIL_PASS)/g' \ - -e 's/QUEENSU_PASS/$(QUEENSU_PASS)/g' $< > $@ - -build/.xinitrc: .xinitrc $(SUBSTS_FILE) - [ -d build ] || mkdir build - sed -e 's/SCREENLAYOUT/$(SCREENLAYOUT)/g' $< > $@ - -build/.xmonad/xmonad.hs: .xmonad/xmonad.hs $(SUBSTS_FILE) - [ -d build/.xmonad ] || mkdir -p build/.xmonad - sed -e 's/XMONAD_DZEN_W/$(XMONAD_DZEN_W)/g' \ - -e 's/XMONAD_DZEN_X/$(XMONAD_DZEN_X)/g' \ - -e 's/XMONAD_DZEN_y/$(XMONAD_DZEN_Y)/g' $< > $@ - -build/%: % - [ -d $(dir $@) ] || mkdir -p $(dir $@) - rsync -a $< $@ - -install: $(BUILD) - rsync -a build/ ~/ - -sha256sums: $(LOCAL_FILES) $(GLOBAL_FILES) Makefile - $(SHA256) `git ls-files | grep -v $@` > $@ - -sha256sums.asc: sha256sums - rm -f $@ - gpg --armor --detach-sign $< - -verify: - # BSD sha256 sum command doesn't have a -c option. - # BSD and coreutils sha256 commands have different outputs, however, the - # sum is always the last field. - awk 'BEGIN {\ - mismatch_count = 0; \ - match_count = 0; \ - } { \ - file = $$2; \ - sub(/^\(/, "", file); \ - sub(/\)$$/, "", file); \ - cmd = "$(SHA256) " file; \ - cmd | getline sum; \ - close(cmd); \ - sum = split(sum, fields); \ - if (fields[sum] == $$NF) { \ - print "Match: " file; \ - match_count += 1; \ - } else { \ - print "Mismatch: " file; \ - mismatch_count += 1; \ - } \ - } END { \ - print match_count, "matches, ", mismatch_count, "mismatches." \ - }' sha256sums - gpg --verify sha256sums.asc - -clean: - rm -fr build - -.PHONY: build install clean verify diff --git a/dm b/dm new file mode 100755 index 0000000..39633c6 --- /dev/null +++ b/dm @@ -0,0 +1,135 @@ +#!gmake -f +SUBSTS_FILE=SUBSTS.local + +# Files that need changes to work locally or that contain sensitive +# information +LOCAL_FILES = \ + .imapfilter/config.lua \ + .mutt/accounts.rc \ + .netrc \ + .offlineimaprc \ + .xmonad/xmonad.hs \ + +# Files that are system independent. +# IMPORTANT: directories must have trailing slash +GLOBAL_FILES = \ + .Xdefaults \ + .config/nitrogen/ \ + .dzen/ \ + .gitconfig \ + .imapfilter/ \ + .inputrc \ + .local/share/wallpapers/ \ + .mailcheckrc \ + .mutt/ \ + .muttrc \ + .notmuch-config \ + .quiltrc-dpkg \ + .screenrc \ + .screenlayout/ \ + .signature \ + .vim/ \ + .vimrc \ + .xinitrc \ + .xmobarrc \ + .xmonad/ \ + .zsh/ \ + .zsh_logout \ + .zshrc \ + bin/ \ + +get-val = $(shell awk '{if (match($$0, /$1/)) { print $$2 } }' $(SUBSTS_FILE)) + +SHA256 = $(call get-val,SHA256) + +LOCAL_PASS = $(call get-val,LOCAL_PASS) +GMAIL_PASS = $(call get-val,GMAIL_PASS) +QUEENSU_PASS = $(call get-val,QUEENSU_PASS) +PM_EMAIL = $(call get-val,PM_EMAIL) +SCREENLAYOUT = $(call get-val,SCREENLAYOUT) +XMONAD_DZEN_W = $(call get-val,XMONAD_DZEN_W) +XMONAD_DZEN_X = $(call get-val,XMONAD_DZEN_X) +XMONAD_DZEN_Y = $(call get-val,XMONAD_DZEN_Y) + +# This target relies on GLOBAL_FILES being before LOCAL_FILES so that the +# build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES. +BUILD = $(patsubst %,build/%,$(GLOBAL_FILES) $(LOCAL_FILES)) + +build: $(BUILD) + +build/.offlineimaprc: .offlineimaprc $(SUBSTS_FILE) + [ -d build ] || mkdir build + sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ + -e 's/GMAIL_PASS/$(GMAIL_PASS)/g' \ + -e 's/QUEENSU_PASS/$(QUEENSU_PASS)/g' $< > $@ + +build/.imapfilter/config.lua: .imapfilter/config.lua $(SUBSTS_FILE) + [ -d build/.imapfilter ] || mkdir -p build/.imapfilter + sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ + -e 's/PM_EMAIL/$(PM_EMAIL)/g' $< > $@ + +build/.netrc: .netrc $(SUBSTS_FILES) + [ -d build ] || mkdir build + sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' $< > $@ + +build/.mutt/accounts.rc: .mutt/accounts.rc $(SUBSTS_FILE) + [ -d build/.mutt ] || mkdir -p build/.mutt + sed -e 's/LOCAL_PASS/$(LOCAL_PASS)/g' \ + -e 's/GMAIL_PASS/$(GMAIL_PASS)/g' \ + -e 's/QUEENSU_PASS/$(QUEENSU_PASS)/g' $< > $@ + +build/.xinitrc: .xinitrc $(SUBSTS_FILE) + [ -d build ] || mkdir build + sed -e 's/SCREENLAYOUT/$(SCREENLAYOUT)/g' $< > $@ + +build/.xmonad/xmonad.hs: .xmonad/xmonad.hs $(SUBSTS_FILE) + [ -d build/.xmonad ] || mkdir -p build/.xmonad + sed -e 's/XMONAD_DZEN_W/$(XMONAD_DZEN_W)/g' \ + -e 's/XMONAD_DZEN_X/$(XMONAD_DZEN_X)/g' \ + -e 's/XMONAD_DZEN_y/$(XMONAD_DZEN_Y)/g' $< > $@ + +build/%: % + [ -d $(dir $@) ] || mkdir -p $(dir $@) + rsync -a $< $@ + +install: $(BUILD) + rsync -a build/ ~/ + +sha256sums: $(LOCAL_FILES) $(GLOBAL_FILES) dm + $(SHA256) `git ls-files | grep -v $@` > $@ + +sha256sums.asc: sha256sums + rm -f $@ + gpg --armor --detach-sign $< + +verify: + # BSD sha256 sum command doesn't have a -c option. + # BSD and coreutils sha256 commands have different outputs, however, the + # sum is always the last field. + awk 'BEGIN {\ + mismatch_count = 0; \ + match_count = 0; \ + } { \ + file = $$2; \ + sub(/^\(/, "", file); \ + sub(/\)$$/, "", file); \ + cmd = "$(SHA256) " file; \ + cmd | getline sum; \ + close(cmd); \ + sum = split(sum, fields); \ + if (fields[sum] == $$NF) { \ + print "Match: " file; \ + match_count += 1; \ + } else { \ + print "Mismatch: " file; \ + mismatch_count += 1; \ + } \ + } END { \ + print match_count, "matches, ", mismatch_count, "mismatches." \ + }' sha256sums + gpg --verify sha256sums.asc + +clean: + rm -fr build + +.PHONY: build install clean verify diff --git a/sha256sums b/sha256sums index 8eb4981..f6a1dce 100644 --- a/sha256sums +++ b/sha256sums @@ -428,7 +428,6 @@ SHA256 (.zsh/func/prompt_wunjo_setup) = d7ca88df2b00187ca2fa3f60065664fddbf1449d SHA256 (.zsh/func/zgitinit) = ebf7af235f15d807b0ccb54eebde31cde3fe24fd389cbdd88c08f4b82bd29e98 SHA256 (.zsh_logout) = 26882b79471c25f945c970f8233d8ce29d54e9d5eedcd2884f88affa84a18f56 SHA256 (.zshrc) = a0c451b022ca58f94d5115dcd4ba5b7b8ea18ac5f86d37707bfb82c752fddb16 -SHA256 (Makefile) = 77b360dd25580986e0a2c44d034238f90a8e454b2063457496361d02e8155f44 SHA256 (README) = 7496fd76af0a3dc71a3b5281c10c1bdcfb24035659a8ca2c32554543109df0f6 SHA256 (SUBSTS) = cec6799c4596de3ae5f7e99d785d2b0edb91743440576a5f173c94c220246485 SHA256 (bin/gpg-mounter) = 9fa3f553f2bb013cd3a572e27dc8d32c46cc7364d2223444209d3c2b2df1582d @@ -436,3 +435,4 @@ SHA256 (bin/gpg-wrapper) = dca4a952c59d58c26a6bf7f8c63c91fc0e7ad1339dcd6fe1cad84 SHA256 (bin/mutt-notmuch) = 7dad320fcccf717c10c2babd0fa9a8aca61590055c86bc83a74567576349bca9 SHA256 (bin/run-mailcheck) = c887ea51ee43157e5ec2d94d9f7d7996863ad75dd4d2179ec0734a5fba86409e SHA256 (bin/update-xmonad.sh) = dc38f1b4682c5a471c6b5b1e8d48f97d6321cfb06cbdef43aed177fe75207e94 +SHA256 (dm) = 256cb9824f811b81cf20a14d90554e06bdc52cca6c0fc2b8b2bb25d4dbc85424 diff --git a/sha256sums.asc b/sha256sums.asc index e11b0b9..431e36e 100644 --- a/sha256sums.asc +++ b/sha256sums.asc @@ -1,33 +1,33 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) -iQUcBAABCgAGBQJOSxSnAAoJEI97+PxKEcl6ks4n/0B+GptkfnjvC8F2MLwDUCWt -AghSLa4IztwnXyScVSL3NXskeV6VCX0gPacWlh8e95koTFdp0yR/GRFLhWkIsDel -XnNcZyzHiN9+5cE+URNLsQa2u8YwMMyvOi/Kkk7geldnJ+Gki1e1NlwJpNWgX5EV -zYClr+vtFYHODqlBaF4RBYZbq4gfPApo7GnTxpMhb6lUZvGyHh/wAHzm1htAgXf/ -67snI7gz+9Qp52O4G5MLmWqqKYoNP3zqsEPtLjHq60RVmpkYxsa2FdZy1QNIdIpf -oAKq0ZBlR6KQsFoY4+JtjyZWrOEcM/4DZQNTOIVxCXkLSyHgD+LYKqp4qNP1bPGA -NBFHhjuPGNZx1M/x7uIodlmIIoY/eK+/LQn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