forked from bestswifter/macbootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
manager.sh
83 lines (59 loc) · 2.14 KB
/
manager.sh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
set -e
pushd `dirname $0` > /dev/null
project_path=`pwd -P`
popd > /dev/null
python_src_path="$project_path/python-src"
shell_src_path="$project_path/shell-src"
config_path="$project_path/config"
source $shell_src_path/base.sh
source $shell_src_path/setup.sh
source $shell_src_path/install.sh
source $shell_src_path/update.sh
source $shell_src_path/path.sh
source $shell_src_path/link.sh
function _get_full_command() {
short=" t:test,
tx:to_xcode_snippets_path,
tm:to_macbootstrap_path,
l:link,
i:install,
u:update"
full=$(expr "$short" : ".* $2:\([^,]*\),.*")
if [ ! $full ]
then
full=$2
fi
echo $full
}
function help() {
cat <<-EOF
Usage: hl [options]
Valid options are:
* about set up my mac
setup automatically configure a new mac
setup_mac_config set all mac system configs
* about check and install tools
install check and install all tools
check_brew check brew and tools installed with brew
check_oh_myzsh check oh-my-zsh and some tools
check_vim check vim env
check_xcode_snippets check xcode snippets
check_others check other tools that cannot be installed using brew
update sync macbootstrap from remote and update on-my-zsh
* about link configs
link link all configs
link_git link git configs
link_shell link shell configs
link_ranger link ranger configs
link_vim link vim configs and check Plugins
link_lldb links lldb configs
* about quick location path
tm jump to macbootstrap path
tx jump to xcode snippets path
* others
help show this help message and exit
EOF
}
action=${1:-help}
$action "$@"