Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryan2005 committed Jan 31, 2019
1 parent 3e2db76 commit 002b392
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
12 changes: 9 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import os.path
from src.init import init
from src.start import start
from src.push import push
from src.pull import pull
platform = sys.platform
if platform == 'win32':
print('请等下一个版本的出现')
Expand All @@ -12,11 +14,15 @@
print('请等下一个版本的出现')
os._exit(0)
else:
start.main()
init.main()
fo = open("/etc/profile", "w")
huanjing='JAVA_HOME=/root/java/jdk1.8.0_152'

if huanjing in fo:

pass
else:
fo.write('JAVA_HOME=/root/java/jdk1.8.0_152')
fo.close()
fo.close()
pull.main()
start.main()
push.main()
4 changes: 1 addition & 3 deletions src/pull/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
__all__ = ['subprocess']

from main import *
from src.pull import pull
5 changes: 2 additions & 3 deletions src/pull/pull.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import subprocess
if __name__ == "__main__":
sh = r'.\src\pull\pull.sh'
sh = r'.\src\pull\pull.sh'
def main():
child = subprocess.Popen(sh,shell=True)
child.wait()
if __package__ == __spec__
5 changes: 3 additions & 2 deletions src/push/push.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess
sh = r'.\src\push\push.sh'
child = subprocess.Popen(sh,shell=True)
child.wait()
def main():
child = subprocess.Popen(sh,shell=True)
child.wait()

0 comments on commit 002b392

Please sign in to comment.