mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-09 16:38:41 +00:00
style: move install files to a renamed folder
The installation files are dirty when they are outside of the folder. It now looks not so mess. And there is no need to place empty jdk files. 果断删除之。
This commit is contained in:
parent
fd77267e3f
commit
c5ef73dc76
2
docker/.gitignore
vendored
2
docker/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
jdk-7u76-linux-x64.tar.gz
|
||||
jdk-8u31-linux-x64.tar.gz
|
3
install
3
install
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f docker/Dockerfile --no-cache=true . -t uoj
|
3
install/bundle/docker_install_uoj
Executable file
3
install/bundle/docker_install_uoj
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f Dockerfile --no-cache=true . -t uoj
|
@ -14,16 +14,16 @@ cid = raw_input('uoj container id: ')
|
||||
ip = raw_input('uoj ip: ')
|
||||
name = raw_input('judger name: ')
|
||||
|
||||
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json docker/judge_client/conf.json")
|
||||
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json conf.json")
|
||||
|
||||
with open('docker/judge_client/conf.json', 'r') as f:
|
||||
with open('conf.json', 'r') as f:
|
||||
conf = json.load(f)
|
||||
|
||||
conf['uoj_host'] = ip
|
||||
conf['judger_name'] = name
|
||||
conf['judger_password'] = ''.join(random.choice('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') for i in range(32))
|
||||
|
||||
with open('docker/judge_client/conf.json', 'w') as f:
|
||||
with open('conf.json', 'w') as f:
|
||||
json.dump(conf, f, indent=4, separators=(',', ': '))
|
||||
print >>f
|
||||
|
||||
@ -32,7 +32,7 @@ translate_table = {
|
||||
'uoj_host': ip
|
||||
}
|
||||
|
||||
translate('docker/judge_client/install', 'docker/judge_client/cur_install', translate_table)
|
||||
translate('install', 'cur_install', translate_table)
|
||||
|
||||
print "please modify the database after getting the judger server ready:"
|
||||
print "insert into judger_info (judger_name, password, ip) values ('%s', '%s', '__judger_ip_here__');" % (name, conf['judger_password'])
|
3
install/judge_client/install_judge_client
Normal file
3
install/judge_client/install_judge_client
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f Dockerfile .
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker build -f docker/judge_client/Dockerfile .
|
Loading…
Reference in New Issue
Block a user