aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 9262db15cd69ea222f8b7114a946749ddec2d84e (plain)
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
ifdef XDG_DATA_HOME
	DATA_DIR=$(XDG_DATA_HOME)
else
	DATA_DIR=$(HOME)/.local/share
endif

ifdef XDG_CONFIG_HOME
	CONF_DIR=$(XDG_CONFIG_HOME)
else
	CONF_DIR=$(HOME)/.config
endif

BIN_DIR=$(HOME)/.local/bin

# TODO: ves needs to be installed as a function in the user's
# shell. This will require making updates to their configuration
# file as part of the install process, which will require a bit
# of extra work.
install:
	- test -d $(DATA_DIR)/ves/bin || mkdir -p $(DATA_DIR)/ves/bin
	- test -d $(DATA_DIR)/ves/lib || mkdir -p $(DATA_DIR)/ves/lib
	- test -d $(DATA_DIR)/ves/envs || mkdir -p $(DATA_DIR)/ves/envs
	- test -d $(CONF_DIR)/ves || mkdir -p $(CONF_DIR)/ves
	- test -d $(BIN_DIR)/ves_scripts || mkdir -p $(BIN_DIR)/ves_scripts
	cp ./*.sh $(BIN_DIR)/ves_scripts
	chmod u+x $(BIN_DIR)/ves_scripts/*


uninstall:
	- test -f $(BIN_DIR)/ves && rm -f $(BIN_DIR)/ves
	- test -d $(BIN_DIR)/ves_scripts && rm -rf $(BIN_DIR)/ves_scripts


purge: uninstall
	- test -d $(DATA_DIR)/ves && rm -rf $(DATA_DIR)/ves
	- test -d $(CONF_DIR)/ves && rm -rf $(CONF_DIR)/ves