Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[r189]: 3.0-packages / release-out.py Maximize Restore History

Download this file

release-out.py    30 lines (25 with data), 972 Bytes

 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
#!/usr/local/bin/python
import pexpect
from subprocess import call
import getpass
i386 = "/usr/obj/i386"
amd64 = "/usr/obj/amd64"
server = "frs.sourceforge.net"
user = raw_input("username: ")
password = getpass.getpass("Password: ")
call('cd /usr/obj && ls GhostBSD*i386* > %s' % i386, shell=True)
call('cd /usr/obj && ls GhostBSD*amd64* > %s' % amd64, shell=True)
#release = open(i386, "r")
#for line in release.readlines():
# foo = pexpect.spawn('scp /usr/obj/%s %s@%s:/home/frs/project/g/gh/ghostbsdproject/release/i386/prerelease/%s'
# % (line.strip(), user, server, line.strip()))
# foo.expect('password:')
# foo.sendline(password)
# foo.interact()
release = open(amd64, "r")
for line in release.readlines():
foo = pexpect.spawn('scp /usr/obj/%s %s@%s:/home/frs/project/g/gh/ghostbsdproject/release/amd64/prerelease/%s'
% (line.strip(), user, server, line.strip()))
foo.expect('password:')
foo.sendline(password)
foo.interact()