-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
81 lines (62 loc) · 1.79 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# set-of-emails/Makefile
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _` | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
# -----------------------------------------------------------------------------
SHELL := /bin/sh
CP := cp
RM := rm -f
GIT := /usr/bin/git
B = master
V = neko
PRIVATEMAILS := private
PUBLICEMAILS := maildir/bsd
DOSFORMATSET := maildir/dos
MACFORMATSET := maildir/mac
.DEFAULT_GOAL = git-status
# -----------------------------------------------------------------------------
.PHONY: clean
git-status:
$(GIT) status
git-push:
@ for v in `$(GIT) remote show | grep -v origin`; do \
printf "[%s]\n" $$v; \
$(GIT) push --tags $$v `$(MAKE) git-current-branch`; \
done
git-tag-list:
$(GIT) tag -l
git-diff:
$(GIT) diff -w
git-branch:
$(GIT) branch -a
git-branch-delete:
$(GIT) branch --merged | grep '^ ' | grep -v 'master' | xargs $(GIT) branch -d
git-current-branch:
@ $(GIT) branch --contains=HEAD | grep '*' | awk '{ print $$2 }'
git-commit-amend:
$(GIT) commit --amend
git-follow-log:
$(GIT) log --follow -p $(V) || \
printf "\nUsage:\n %% make $@ V=<filename>\n"
git-branch-tree:
$(GIT) log --graph \
--pretty='format:%C(yellow)%h%Creset %s %Cgreen(%an)%Creset %Cred%d%Creset'
git-rm-cached:
$(GIT) rm -f --cached $(V) || \
printf "\nUsage:\n %% make $@ V=<filename>\n"
git-reset-soft:
$(GIT) reset --soft HEAD^
fix-commit-message: git-commit-amend
cancel-the-latest-commit: git-reset-soft
remove-added-file: git-rm-cached
diff push branch:
@$(MAKE) git-$@
update-sample-emails:
for v in `find $(PUBLICEMAILS) -name '*-01.eml' -type f`; do \
f="`basename $$v`" ;\
nkf -Lw $$v > $(DOSFORMATSET)/$$f ;\
nkf -Lm $$v > $(MACFORMATSET)/$$f ;\
done
clean: