forked from FlowCrypt/flowcrypt-browser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
do
executable file
·31 lines (27 loc) · 1.05 KB
/
do
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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import sys
choices = [
('c', 'chrome_pack', '\tpack chrome extension and run automated tests'),
('fr', 'firefox_run', '\trun firefox extension'),
('fR!', 'firefox_release', '\tpack and release firefox'),
('c2f', 'chrome_to_firefox', 'replace firefox code with chrome code'),
('f2c', 'firefox_to_chrome', 'replace chrome code with firefox code'),
('f', 'firefox_pack', '\tpack firefox extension'),
('fwu', 'firefox_update_web', '\tpack and release firefox'),
('fu', 'firefox_upload', '\tsigned package to s3'),
('lib', 'chrome_update_libs', 'very possibly a broken script'),
('bsl', 'chrome_update_licence', 'update licence statements in all project files'),
]
if len(sys.argv) == 1:
for c in choices:
print('%s\t%s\t\t%s' % c)
shortcut = input('')
valid_choice = [c for c in choices if shortcut == c[0]]
if not valid_choice:
raise Exception('Unknown choice')
command = valid_choice[0][1]
else:
command = sys.argv[1]
os.system('../flowcrypt-script/browser/%s' % command)