summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-19 01:05:33 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-19 01:05:33 +0100
commite1082eef0e630efa818d2b0cda7f077f27edc4c0 (patch)
tree8117acbead2cc9af2389fbe132cefc2ebd92c198
parent9ede36a45bde78cc2e440188f5385e4213a5c7c9 (diff)
Try to fix output directories for debs.
-rwxr-xr-xcdist10
1 files changed, 9 insertions, 1 deletions
diff --git a/cdist b/cdist
index 6388ebe..a62c52c 100755
--- a/cdist
+++ b/cdist
@@ -409,7 +409,15 @@ elif args.command == 'package':
target = Target(args.target)
env = target.environment
r = env.package(target, project)
- copyfile(r, '%s/%s' % (args.output, os.path.basename(r)))
+ if target.platform == 'linux':
+ out = '%s-%d' % (target.version, target.bits)
+ try:
+ os.makedirs(out)
+ except:
+ pass
+ copyfile(r, '%s/%s' % (out, os.path.basename(r)))
+ else:
+ copyfile(r, '%s/%s' % (args.output, os.path.basename(r)))
env.cleanup()