-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_.command
executable file
·84 lines (62 loc) · 2.61 KB
/
_.command
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
#!/bin/zsh
# Get the current directory
current_dir="$(dirname "$0")"
echo $current_dir
# AppleScript to open a new terminal window, run the command in the current directory, and then start a new Zsh shell
# WEB - run pages and dev to run the http server, compile, and watch
#osascript <<EOD
# tell application "Terminal"
#
# set newWindow1 to do script "cd '$current_dir'/client/www; npm run pages; exec /bin/zsh"
# set custom title of newWindow1 to "web pages"
# activate
# set newWindow2 to do script "cd '$current_dir'/client/www; npm run dev; exec /bin/zsh"
# set custom title of newWindow2 to "web dev"
# activate
# end tell
#EOD
# PROXY WORKER - run dev to compile, start server, and watch
osascript <<EOD
tell application "Terminal"
set newWindow3 to do script "cd '$current_dir'/server/worker/proxy; npm run dev; exec /bin/zsh"
set custom title of newWindow3 to "workers/p dev"
activate
end tell
EOD
# USER WORKER - run d1 to generate db, dev to compile, start server, and watch
osascript <<EOD
tell application "Terminal"
set newWindow4 to do script "cd '$current_dir'/server/worker/user; npm run d1; npm run dev; exec /bin/zsh"
set custom title of newWindow4 to "workers/u dev"
activate
end tell
EOD
# WALLET WORKER - run d1 to generate db, dev to compile, start server, and watch
osascript <<EOD
tell application "Terminal"
set newWindow6 to do script "cd '$current_dir'/server/worker/wallet; npm run d1; npm run dev; exec /bin/zsh"
set custom title of newWindow6 to "workers/w dev"
activate
end tell
EOD
# ELECTRON - run electron-dev to compile electron source code and watch for changes to electron source code. run dev to run electron app and watch for electron recompile or web recompile, and relaunch electron app automatically
osascript <<EOD
tell application "Terminal"
set newWindow8 to do script "cd '$current_dir'/client/desktop; npm run electron-dev; exec /bin/zsh"
set custom title of newWindow8 to "desktop/electron-dev"
activate
set newWindow7 to do script "cd '$current_dir'/client/desktop; npm run dev; exec /bin/zsh"
set custom title of newWindow7 to "desktop/dev"
activate
end tell
EOD
osascript <<EOD
tell application "Terminal"
set newWindow7 to do script "cd '$current_dir'/client/desktop/www; npm run dev; exec /bin/zsh"
set custom title of newWindow7 to "desktop/www/dev"
activate
set newWindow1 to do script "cd '$current_dir'/client/desktop/www; npm run pages; exec /bin/zsh"
set custom title of newWindow1 to "web pages"
activate
end tell
EOD