chiark / gitweb /
Check that metadata and tmp exist (fixes #266)
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 6 Jul 2013 13:27:06 +0000 (15:27 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 6 Jul 2013 13:27:06 +0000 (15:27 +0200)
fdroid

diff --git a/fdroid b/fdroid
index d29841d7921dc3ef13548cf56e8e2c424c313824..13ec03e3d4182c230de67b250b7a7eb6046d2e3e 100755 (executable)
--- a/fdroid
+++ b/fdroid
@@ -18,6 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import sys
+import os
 
 commands = [
         "build",
@@ -49,6 +50,10 @@ def main():
         print_help()
         sys.exit(1)
 
+    for basedir in ('metadata', 'tmp'):
+        if not os.path.exists(basedir):
+             os.makedirs(basedir)
+
     # Trick optparse into displaying the right usage when --help is used.
     sys.argv[0] += ' ' + command