-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (54 loc) · 1.77 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
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _` | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
# -------------------------------------------------------------------------------------------------
SHELL := /bin/sh
TIME := $(shell date '+%s')
PERL ?= perl
MKDIR := mkdir -p
CP := cp -p
MV := mv
RM := rm -f
QE := queuemetre
GIT ?= git
.DEFAULT_GOAL = git-status
REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff git-reset-soft git-rm-cached git-branch
# -------------------------------------------------------------------------------------------------
.PHONY: clean
install:
install -o root -m 0755 $(QE) /usr/local/sbin/$(QE)
test:
$(PERL) -cw ./$(QE)
$(PERL) ./$(QE) --version
$(PERL) ./$(QE) --help
# -------------------------------------------------------------------------------------------------
git-status:
$(GIT) status
push: git-push
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-reset-soft:
$(GIT) reset --soft HEAD^
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 $@ 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"
# -------------------------------------------------------------------------------------------------
clean: