Automatically dump distribution folders where I want them, next to the vise scripts.
This commit is contained in:
parent
b8f820c5a9
commit
68552ddece
|
@ -208,15 +208,12 @@ class Main:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
InitUI()
|
InitUI()
|
||||||
fss, ok = macfs.GetDirectory('Source directory:')
|
os.chdir(sys.prefix)
|
||||||
if not ok:
|
|
||||||
sys.exit(0)
|
|
||||||
os.chdir(fss.as_pathname())
|
|
||||||
if not os.path.isdir(':Mac:Distributions'):
|
if not os.path.isdir(':Mac:Distributions'):
|
||||||
os.mkdir(':Mac:Distributions')
|
os.mkdir(':Mac:Distributions')
|
||||||
typedist = GetType()
|
self.typedist = GetType()
|
||||||
self.inc = IncMatcher(':Mac:Distributions:%s.include'%typedist)
|
self.inc = IncMatcher(':Mac:Distributions:%s.include'%self.typedist)
|
||||||
self.exc = ExcMatcher(':Mac:Distributions:%s.exclude'%typedist)
|
self.exc = ExcMatcher(':Mac:Distributions:%s.exclude'%self.typedist)
|
||||||
self.ui = MkDistrUI(self)
|
self.ui = MkDistrUI(self)
|
||||||
self.ui.mainloop()
|
self.ui.mainloop()
|
||||||
|
|
||||||
|
@ -259,7 +256,7 @@ class Main:
|
||||||
rv = rv + self.checkdir(d, 0)
|
rv = rv + self.checkdir(d, 0)
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
def run(self, destprefix):
|
def run(self):
|
||||||
missing = self.inc.checksourcetree()
|
missing = self.inc.checksourcetree()
|
||||||
if missing:
|
if missing:
|
||||||
print '==== Missing source files ===='
|
print '==== Missing source files ===='
|
||||||
|
@ -267,6 +264,8 @@ class Main:
|
||||||
print i
|
print i
|
||||||
print '==== Fix and retry ===='
|
print '==== Fix and retry ===='
|
||||||
return
|
return
|
||||||
|
destprefix = os.path.join(sys.prefix, ':Mac:Distributions:vise')
|
||||||
|
destprefix = os.path.join(destprefix, '%s Distribution'%self.typedist)
|
||||||
if not self.rundir(':', destprefix, 0):
|
if not self.rundir(':', destprefix, 0):
|
||||||
return
|
return
|
||||||
self.rundir(':', destprefix, 1)
|
self.rundir(':', destprefix, 1)
|
||||||
|
|
|
@ -183,14 +183,8 @@ class MainListWindow(ListWindow):
|
||||||
if item == MAIN_LIST:
|
if item == MAIN_LIST:
|
||||||
self.do_listhit(event)
|
self.do_listhit(event)
|
||||||
if item == MAIN_MKDISTR:
|
if item == MAIN_MKDISTR:
|
||||||
## XXXX Why doesn't this work??!?!?
|
|
||||||
## fss, ok = macfs.StandardPutFile('Destination folder?')
|
|
||||||
## if not ok:
|
|
||||||
## return
|
|
||||||
## dest = fss.as_pathname()
|
|
||||||
dest = os.path.join(os.getcwd(), 'Distribution')
|
|
||||||
setwatchcursor()
|
setwatchcursor()
|
||||||
self.cb_run(dest)
|
self.cb_run()
|
||||||
setarrowcursor()
|
setarrowcursor()
|
||||||
if item == MAIN_CHECK:
|
if item == MAIN_CHECK:
|
||||||
setwatchcursor()
|
setwatchcursor()
|
||||||
|
|
Loading…
Reference in New Issue