-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (47 loc) · 1.84 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
shell=/bin/zsh
c=""
help:
@echo " ________"
@echo " | |"
@echo " | >shell |"
@echo " #### # # ## #### |________| "
@echo " # # # # # # # ###########"
@echo " #### ##### # # #### # "
@echo " # # # # # # # # "
@echo "#### # # ## # # # "
@echo " # "
@echo ""
@echo "–––––––––––––––––––––––––––––––––––––––––––––––––––––––"
@echo "params | 含义"
@echo "–––––––––––––––––––––––––––––––––––––––––––––––––––––––"
@echo " c | 文件夹编号"
@echo " |"
@echo " shell | 指定shell脚本解释器,默认值 /bin/zsh"
@echo "–––––––––––––––––––––––––––––––––––––––––––––––––––––––"
@echo ""
@echo ""
@echo "for example👀"
@echo ""
@echo "make run c=0"
@echo " 执行0-notes/shell_notes.sh"
@echo ""
@echo "make run c=1 shell=/bin/bash"
@echo " 使用/bin/bash执行1-variable/shell_variable.sh"
@echo ""
run:
@if [[ -z ${c} ]]; then \
echo "Welcome to Short Shell"; \
echo "please run: ";\
echo " make help"; \
echo " or"; \
echo " make"; \
echo "get more information"; \
else \
dir=$$( ls | grep ^${c}- ); \
theme=$${dir#*-}; \
if [[ ${c} == 13 ]]; then \
${shell} "$${dir}/shell_$${theme}.sh" -p 81 --name husky; \
else \
${shell} "$${dir}/shell_$${theme}.sh"; \
fi \
fi