-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (38 loc) · 1.38 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
scripts_dir := scripts
arg :=
.PHONY: help change_root_dir disable_gpu select_shell setup_gui setup sync_git_user clean
help:
@echo "Usage: make [target] [arg=<arg>]"
@echo ""
@echo " targets:"
@printf " setup \e[32m[default]\e[m create directories for mount\n"
@echo " help show this help message"
@echo " change_root_dir change root directory for mount (arg=<new_root_dir>)"
@echo " disable_gpu disable gpu ([option] arg=enable_gpu)"
@echo " select_shell select shell (arg=bash or zsh)"
@echo " setup_gui setup gui"
@echo " sync_git_user sync git user, email, and ssh key ([option] arg=disable)"
@echo " clean clean"
@echo ""
@echo " show help of target:"
@echo " make [target] arg=-h"
@echo ""
@printf "For normal setup, only '\e[32mmake setup\e[m' is required.\n"
change_root_dir:
@$(scripts_dir)/change_root_dir.bash $(arg)
disable_gpu:
@$(scripts_dir)/disable_gpu.bash $(arg)
select_shell:
@$(scripts_dir)/select_shell.bash $(arg)
setup_gui:
@$(scripts_dir)/setup_gui.bash $(arg)
setup:
@if [ "$(shell uname)" = "Darwin" ]; then $(scripts_dir)/disable_gpu.bash; fi
@$(scripts_dir)/setup.bash $(arg)
@$(scripts_dir)/setup_gui.bash
sync_git_user:
@$(scripts_dir)/sync_git_user.bash $(arg)
clean:
@$(scripts_dir)/setup.bash clean
@git checkout -- .
@if [ -f root_dir.log ]; then rm root_dir.log; fi