forked from kakao/hbase-region-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhacking
executable file
·35 lines (29 loc) · 956 Bytes
/
hacking
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
#!/usr/bin/env bash
profile=${1:-1.0}
target="{bottom-right}"
if [ -z "$TMUX" ]; then
echo Requires tmux
exit 1
fi
if [ "$(tmux list-panes | wc -l)" -ne 1 ]; then
echo Too many panes already
exit 1
fi
tmux split-window -d -h "make autotest profile=$profile; bash"
tmux split-window -t "$target" -d -p 80 "make serve profile=$profile; bash"
echo -n "Waiting for nREPL to start "
while ! tmux capture-pane -t "$target" -p | grep 'Started nREPL' > /dev/null; do
echo -n .
sleep 1
done
echo
tmux split-window -t "$target" -d -p 75 "make repl profile=$profile; bash"
echo -n "Waiting for user prompt "
while ! tmux capture-pane -t "$target" -p | grep '^user=>' > /dev/null; do
echo -n .
sleep 1
done
echo
tmux send-keys -t "$target" "(in-ns 'hbase-region-inspector.core)" Enter
tmux send-keys -t "$target" "(require '[clojure.pprint :refer [pprint]])" Enter
tmux send-keys -t "$target" "(reset! config (config/parse \"localhost\"))" Enter