From: Ralf Jung Date: Fri, 27 Jul 2012 12:17:01 +0000 (+0200) Subject: Create all necessary paths automatically X-Git-Url: https://git.ralfj.de/auto-debuild.git/commitdiff_plain/89f11516cca7f7a1e6792fe7eeef5577e740e852?hp=51a545889a5c19e7acb8e987a95df1fb81e50eae Create all necessary paths automatically --- diff --git a/auto_debuild.py b/auto_debuild.py index 9d7c042..eda72e3 100755 --- a/auto_debuild.py +++ b/auto_debuild.py @@ -77,8 +77,11 @@ def createDebianFiles(config): # we return the list of files generated, so we need to know the architecture arch = getArchitecture(config) files = [] - # source format file + # create folders + if not os.path.exists('debian'): os.mkdir('debian') if not os.path.exists('debian/source'): os.mkdir('debian/source') + if not os.path.exists(debDir): os.mkdir(debDir) + # source format file with open('debian/source/format', 'w') as f: print >>f, "3.0 (native)" # compat file @@ -149,7 +152,7 @@ def createDebianFiles(config): def buildDebianPackage(config): commands = ['dpkg-checkbuilddeps', 'debian/rules clean', 'debian/rules build', 'fakeroot debian/rules binary', 'debian/rules clean'] - command = ['bash', '-c', ' && '.join(commands)] + command = ['nice', 'bash', '-c', ' && '.join(commands)] subprocess.check_call(commandInBuildEnv(config, command)) # all at once