-
Notifications
You must be signed in to change notification settings - Fork 0
/
Repository.mk
73 lines (56 loc) · 2.02 KB
/
Repository.mk
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
# go-sisimai/Repository.mk
# ____ _ _ _
# | _ \ ___ _ __ ___ ___(_) |_ ___ _ __ _ _ _ __ ___ | | __
# | |_) / _ \ '_ \ / _ \/ __| | __/ _ \| '__| | | | | '_ ` _ \| |/ /
# | _ < __/ |_) | (_) \__ \ | || (_) | | | |_| |_| | | | | | <
# |_| \_\___| .__/ \___/|___/_|\__\___/|_| \__, (_)_| |_| |_|_|\_\
# |_| |___/
# -----------------------------------------------------------------------------
SHELL := /bin/sh
GIT ?= git
CP := cp
V = neko
RSYNC = rsync -var
EMAILS = set-of-emails
.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) -f Repository.mk 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-commit-amend:
$(GIT) commit --amend
git-current-branch:
@$(GIT) branch --contains=HEAD | grep '*' | awk '{ print $$2 }'
git-follow-log:
$(GIT) log --follow -p $(V) || \
printf "\nUsage:\n %% make -f Repository.mk $@ 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 -f Repository.mk $@ V=<filename>\n"
git-reset-soft:
$(GIT) reset --soft HEAD^
import-set-of-emails:
test -d $(EMAILS)
$(CP) -vRp ../$(EMAILS)/README.md $(EMAILS)/
$(RSYNC) ../$(EMAILS)/mailbox/ ./$(EMAILS)/mailbox/
$(RSYNC) ../$(EMAILS)/maildir/ ./$(EMAILS)/maildir/
$(RSYNC) ../$(EMAILS)/private/ ./$(EMAILS)/private/
$(RSYNC) ../$(EMAILS)/to-be-debugged-because/ ./$(EMAILS)/to-be-debugged-because/
$(RSYNC) ../$(EMAILS)/to-be-parsed-for-test/ ./$(EMAILS)/to-be-parsed-for-test/
clean: