summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 21:11:57 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 21:11:57 -0700
commit7ac2e599f7f132ce63b933872b9c6649b94e06e3 (patch)
tree6363b42badc45e10856f683fe8c8302e95b442e5 /packages
parentc1b9c57b25a96b2af66fb89e418101623665aa5a (diff)
downloadvyos-cloud-init-7ac2e599f7f132ce63b933872b9c6649b94e06e3.tar.gz
vyos-cloud-init-7ac2e599f7f132ce63b933872b9c6649b94e06e3.zip
Use a directory prefix
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/tar-me12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/tar-me b/packages/tar-me
index b15399a1..4a4a0253 100755
--- a/packages/tar-me
+++ b/packages/tar-me
@@ -61,12 +61,18 @@ def main(args):
if not fn or fn.startswith("."):
continue
fns.append(fn)
-
bfn = 'cloud-init-%s-%s' % (version, revno)
+ os.makedirs(join(td, bfn))
+
+ for fn in fns:
+ if os.path.isfile(fn):
+ shutil.copy(fn, join(td, bfn, fn))
+ else:
+ shutil.copytree(fn, join(td, bfn, fn))
+
fn = '%s.tar.gz' % (bfn)
o_fn = join(td, fn)
- cmd = ['tar', '-czf', o_fn]
- cmd.extend(fns)
+ cmd = ['tar', '-czf', o_fn, '-C', join(td), bfn]
tiny_p(cmd)
os.chdir(owcd)