-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
33 lines (26 loc) · 979 Bytes
/
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
SHELL = /bin/sh
ifeq ($(shell id -u), 0)
PREFIX ?= /usr/local
else
PREFIX ?= $(HOME)
endif
ifeq ($(PREFIX), $(HOME))
FISH_FUNCTION_DIR ?= $(HOME)/.config/fish/functions
FISH_COMPLETION_DIR ?= $(HOME)/.config/fish/completions
else
FISH_FUNCTION_DIR ?= $(PREFIX)/share/fish/vendor_functions.d
FISH_COMPLETION_DIR ?= $(PREFIX)/share/fish/vendor_completions.d
endif
all:
install: install_sh install_fish
install_sh:
install -d $(DESTDIR)$(PREFIX)/share/chtf
install -m 0644 chtf/chtf.sh $(DESTDIR)$(PREFIX)/share/chtf
install -m 0755 chtf/__chtf_terraform-install.sh $(DESTDIR)$(PREFIX)/share/chtf
install_fish:
install -d $(DESTDIR)$(FISH_FUNCTION_DIR)
install -m 0644 chtf/chtf.fish $(DESTDIR)$(FISH_FUNCTION_DIR)
install -m 0755 chtf/__chtf_terraform-install.sh $(DESTDIR)$(FISH_FUNCTION_DIR)
install -d $(DESTDIR)$(FISH_COMPLETION_DIR)
install -m 0644 etc/chtf-completion.fish $(DESTDIR)$(FISH_COMPLETION_DIR)/chtf.fish
.PHONY: all install