-
Notifications
You must be signed in to change notification settings - Fork 1
/
start
executable file
·60 lines (52 loc) · 1.37 KB
/
start
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
#!/bin/sh
# Make a new OS X Terminal tab with the current working directory.
if [ $# -ne 1 ]; then
PATHDIR=`pwd`
else
PATHDIR=$1
fi
/usr/bin/osascript <<EOF
activate application "Terminal"
tell application "System Events"
keystroke "t" using {command down}
end tell
tell application "Terminal"
repeat with win in windows
try
if get frontmost of win is true then
do script "./mongo/mongo/bin/mongod" in (selected tab of win)
end if
end try
end repeat
end tell
EOF
sleep 2
/usr/bin/osascript <<EOF
tell application "System Events"
keystroke "t" using {command down}
end tell
tell application "Terminal"
repeat with win in windows
try
if get frontmost of win is true then
do script "cd $PATHDIR; clear" in (selected tab of win)
do script "./mongo/mongo/bin/mongo" in (selected tab of win)
end if
end try
end repeat
end tell
tell application "System Events"
keystroke "t" using {command down}
end tell
tell application "Terminal"
repeat with win in windows
try
if get frontmost of win is true then
do script "cd $PATHDIR; clear" in (selected tab of win)
do script "supervisor src/app" in (selected tab of win)
end if
end try
end repeat
end tell
EOF
clear