summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@cs2s.cs>2014-11-09 22:13:13 +0000
committerCarl Hetherington <carl@cs2s.cs>2014-11-09 22:13:13 +0000
commit991c3fc5fc42dcbbb4b719f3a4adfe41812f9db9 (patch)
tree4520fc320e0935f08f258fb95a588ac962da2e37
parent08e04818d89439377e8597eb9a0d42fcfc80c380 (diff)
Fix directory creation when copying output to remotes.
-rwxr-xr-xcdist9
1 files changed, 8 insertions, 1 deletions
diff --git a/cdist b/cdist
index d6fbb0a..1c4f8c8 100755
--- a/cdist
+++ b/cdist
@@ -128,6 +128,13 @@ def copyfile(a, b):
log('copy %s -> %s' % (scp_escape(a), scp_escape(b)))
os.system('scp %s %s' % (scp_escape(a), scp_escape(b)))
+def makedirs(d):
+ if d.find(':') == -1:
+ os.makedirs(d)
+ else:
+ s = d.split(':')
+ os.system('ssh %s -- mkdir %s' % (s[0], s[1])
+
def rmdir(a):
log('remove %s' % a)
os.rmdir(a)
@@ -657,7 +664,7 @@ def main():
if target.platform == 'linux':
out = '%s%s-%s-%d' % (args.output, target.distro, target.version, target.bits)
try:
- os.makedirs(out)
+ makedirs(out)
except:
pass
for p in packages: