forked from mrkmg/git-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (46 loc) · 1.81 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
VERSION = 0.8.0
PREFIX ?= /usr/local
DEST_BIN_DIR = $(PREFIX)/bin
DEST_BASH_COMPLETION_DIR = /etc/bash_completion.d
DEST_ZSH_COMPLETION_DIR = /usr/share/zsh/site-functions
SOURCE_BIN_DIR = ./bin/
SOURCE_SUPPORT_DIR = ./support/
LOADER = git-stream
COMPLETION_BASH = git-stream-completion.bash
COMPLETION_ZSH = git-stream-completion.zsh
COMMANDS = git-stream-init
COMMANDS += git-stream-feature
COMMANDS += git-stream-feature-start
COMMANDS += git-stream-feature-finish
COMMANDS += git-stream-feature-list
COMMANDS += git-stream-feature-update
COMMANDS += git-stream-hotfix
COMMANDS += git-stream-hotfix-start
COMMANDS += git-stream-hotfix-finish
COMMANDS += git-stream-hotfix-list
COMMANDS += git-stream-release
COMMANDS += git-stream-release-start
COMMANDS += git-stream-release-finish
COMMANDS += git-stream-release-list
all:
@echo "usage: make [test|install|uninstall|install_completion|uninstall_completion]"
test:
./tests/bats/bin/bats ./tests/specs/*
install:
install -d -m 0755 $(DEST_BIN_DIR)
cd $(SOURCE_BIN_DIR) && install -m 0755 $(LOADER) $(DEST_BIN_DIR)
cd $(SOURCE_BIN_DIR) && install -m 0644 $(COMMANDS) $(DEST_BIN_DIR)
uninstall:
test -d $(DEST_BIN_DIR) && \
cd $(DEST_BIN_DIR) && \
rm -f $(LOADER) $(COMMANDS)
install_completion:
test -d $(DEST_BASH_COMPLETION_DIR) && \
cd $(SOURCE_SUPPORT_DIR) && install -m 0644 -T $(COMPLETION_BASH) $(DEST_BASH_COMPLETION_DIR)/git-stream || true
test -d $(DEST_ZSH_COMPLETION_DIR) && \
cd $(SOURCE_SUPPORT_DIR) && install -m 0644 -T $(COMPLETION_ZSH) $(DEST_ZSH_COMPLETION_DIR)/_git-stream || true
uninstall_completion:
test -d $(DEST_BASH_COMPLETION_DIR) && \
rm -f $(DEST_BASH_COMPLETION_DIR)/git-stream
test -d $(DEST_ZSH_COMPLETION_DIR) && \
rm -f $(DEST_ZSH_COMPLETION_DIR)/_git-stream