diff options
| author | Douglas Rumbaugh <doug@douglasrumbaugh.com> | 2021-12-20 14:19:22 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <doug@douglasrumbaugh.com> | 2021-12-20 14:19:22 -0500 |
| commit | 3fa10a2e54ca241c16a4c7038c1b399ebb4cd015 (patch) | |
| tree | 5919db5769b08a3dcaf0c004707590b469f3cb1c /Makefile | |
| parent | 0a62a76869df779760c789ee90eecdb245813725 (diff) | |
| download | sh-ves-3fa10a2e54ca241c16a4c7038c1b399ebb4cd015.tar.gz | |
Initial makefile+dummy scripts
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2cf2064 --- /dev/null +++ b/Makefile @@ -0,0 +1,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 + +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 ./ves.sh $(BIN_DIR)/ves + chmod u+x $(BIN_DIR)/ves + cp ./ves-*.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 |