-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.sh
executable file
·68 lines (60 loc) · 1.37 KB
/
scripts.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
#!/bin/sh
watcher(){
while true ;do
inotifywait *.go
rm -rf lvcl.sock loc.log
clear
go run .
cat loc.log
done
}
watcher_client(){
while true ;do
inotifywait *.go
rm -rf lvcl.sock loc.log 2>&1 >/dev/null
clear;
go build
./lvcl-client
# cat loc.log
done
}
push(){
scp lvcl [email protected]:/root/
scp lvcl [email protected]:/root/
scp lvcl [email protected]:/root/
scp -r domains [email protected]:/root/
scp -r domains [email protected]:/root/
scp -r domains [email protected]:/root/
}
tmuxSetup(){
tmux -L lvclTEST new-session -d ssh [email protected] '/root/lvcl 2>&1 |tee lol'
tmux -L lvclTEST split-window -d ssh [email protected] '/root/lvcl 2>&1 |tee lol'
tmux -L lvclTEST split-window -d ssh [email protected] '/root/lvcl 2>&1 |tee lol'
#tmux -L lvclTEST select-layout even-horizontal
tmux -L lvclTEST select-layout even-vertical
}
sshForAll(){
for x in $sshHosts; do
ssh $x "$1"
done
}
superWatcher(){
while true ;do
inotifywait *.go
rm -rf lvcl.sock loc.log lvcl
sshForAll "rm /root/lvcl /root/loc.log /root/cmb.log /root/stdout "
sshForAll "rm /root/lvcl.sock"
sshForAll "killall lvcl"
sleep 1
clear;
go build || continue
push
tmuxSetup
tmux -L lvclTEST attach
ssh [email protected] cat /root/loc.log
ssh [email protected] cat /root/lol
done
}
#watcher_client
superWatcher