From: Ralf Jung Date: Mon, 2 Sep 2013 16:03:20 +0000 (+0200) Subject: make using /tmp for the debian folder configurable (but it remains the default) X-Git-Url: https://git.ralfj.de/auto-debuild.git/commitdiff_plain/39c140db8f8b040fc25e118ee17b4aee2217643a?ds=inline make using /tmp for the debian folder configurable (but it remains the default) --- diff --git a/auto_debuild.py b/auto_debuild.py index 94c7c14..24720b9 100755 --- a/auto_debuild.py +++ b/auto_debuild.py @@ -229,11 +229,14 @@ def createDebianFiles(config): files = [] # create folders if os.path.exists('debian') or os.path.islink('debian'): raise Exception('debian folder already exists?') - tempdir = tempfile.mkdtemp(prefix='auto-debuild-') - os.mkdir(tempdir+'/source') - os.symlink(tempdir, 'debian') + if config.getbool('useTmp', True): + tempdir = tempfile.mkdtemp(prefix='auto-debuild-') + os.symlink(tempdir, 'debian') + else: + os.mkdir('debian') if not os.path.exists(debDir): os.makedirs(debDir) # source format file + os.mkdir('debian/source') with open('debian/source/format', 'w') as f: print >>f, "3.0 (native)" # compat file