-
Notifications
You must be signed in to change notification settings - Fork 17
/
setup
executable file
·39 lines (38 loc) · 1.17 KB
/
setup
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
#!/usr/bin/env python3
################################################################
# This file part of GALA Gap-free Long-reads Assembler #
# Auther: Mohamed awad #
# Company: Xiangchao Gan lab (MPIPZ) #
# Released under the (MIT) license (see LICENSE file) #
################################################################
import os
a=['ccm','comp','mdm','newgenome','gala','readsep','reformat','seprator']
for i in a:
b=os.getcwd()
os.system('mkdir -p bin')
c=''.join(list(open(i)))
c=c.replace('path=os.getcwd()','path="'+b+'/bin"')
d=open('bin/'+i,'w')
d.writelines(c)
d.close()
os.system('cp -avr scr bin/' )
os.system('chmod +x bin/'+i )
print(i+'\tSuccsessfully installed')
home='/home/'
a=os.listdir(home)
fil=home+a[0]+'/'+'.bashrc'
fil2=home+a[0]+'/'+'.bash_profile'
try:
b=open(fil,'rw')
except:
b=open(fil,'w')
try:
bb=open(fil2,'rw')
except:
bb=open(fil2,'w')
path=os.getcwd()
c='export PATH="'+os.getcwd()+'/bin:$PATH"'
os.system("echo '"+c+"\n' >> "+fil)
os.system("echo '"+c+"\n' >> "+fil2)
os.system('sh '+fil)
os.system('sh '+fil2)