/
macman
executable file
·238 lines (229 loc) · 2.86 KB
/
macman
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/bin/sh
MAC="$(dirname "$0")"
# catch and export parameters
fn=$1
firstParameter=$2
secondParameter=$3
allParameters=${@:2}
export MAC
export fn
export firstParameter
export secondParameter
export allParameters
COMMANDS=(
list
help
helper
h
gen
git
g
fun
f
com
c
term
t
dl
d
docker
dc
info
lock
restart
sleep
shutdown
uptime
mem
speed
ports
ip.loc
ip.pub
clock
battery
fd.size
fd.hid
hid.on
hid.off
bt.stat
bt.on
bt.off
wifi.stat
wifi.scan
wifi.on
wifi.off
wifi.pass
vpn.start
vpn.stop
vpn.ls
ejectall
md5
g.init
g.clone
g.log
g.stat
g.open
go
g.size
g.re
g.conf
g.undo
g.add
g.add.all
g.commit
g.ac
g.aca
g.acp
g.acap
g.mv
g.rm
g.wipe
g.clean
g.push
g.pull
g.merge
g.rebase
g.th.bh
g.th.re.bh
g.co.bh
g.co.re.bh
g.ls.bh
g.rm.bh
g.rm.re.bh
g.stash
g.unstash
g.lfs.init
g.lfs.tk
g.lfs.untk
g.lfs.ls
g.lfs.conf
pdf.html
wttr
top10
starwar
cal
cal.week
cal.mon
cal.add
say
mail
compose
maps
compute
define
ol.open
olgo
pymake
imshow
ascii
vim
ag
cat
share
waka
md
lszip
unzip
zip
lstar
untar
tar
s.re
s.de
s.ls
s.at
s.rm
s.rm.all
s.div.h
s.div.t
s.go.left
sl
s.go.right
sr
s.go.up
su
s.go.down
sd
spx
s.re.left
srl
s.re.right
srr
s.re.up
sru
s.re.down
srd
t.at
t.ls
t.de
t.re
t.rm
t.rm.all
t.div.h
t.div.v
t.go.left
tl
t.go.right
tr
t.go.up
tu
t.go.down
td
tpx
t.re.left
trl
t.re.right
trr
t.re.up
tru
t.re.down
trd
k.doc
k.doc.model
k.doc.layers
k.doc.preproc
k.doc.train
k.doc.utils
d.build
d.ls.con
d.ls.all.con
d.ls.img
d.start
d.kill
d.rm.img
d.rm.con
d.pull
d.push
d.run.img
d.run
r.get
)
if [ -z "$fn" ]; then
fn="list"
fi
if [[ ! " ${COMMANDS[@]} " =~ " ${fn} " ]]; then
echo "${RED}Command not found: ${NC}"
echo "$fn"
echo
echo "Do you mean: "
for cmd in "${COMMANDS[@]}"; do
if test "${cmd#*$fn}" != "$cmd"
then
echo "${cmd}"
fi
done
if [ ! -z "$allParameters" -a "$allParameters" != " " ]; then
echo "${RED}\nParameters: ${NC}"
echo "$allParameters"
fi
fi
# Linking plugins
"$MAC/tools/help.sh"
"$MAC/tools/general.sh"
"$MAC/tools/git.sh"
"$MAC/tools/functors.sh"
"$MAC/tools/compressor.sh"
"$MAC/tools/multiterm.sh"
"$MAC/tools/dl.sh"
"$MAC/tools/docker.sh"
"$MAC/tools/ngrok.sh"