print "cmd: '%s'" % ' '.join(cmd)
subprocess.check_call(cmd)
- # Only keep the old bindir copy in the bld dir if we
- # are to copy (not symlink) the contents and reuse it.
- if not options.do_reuse_bindir or not options.do_copy_bindir:
- rm_rf(bld_dir_bin)
-
print "Symlinking contents of src dir '%s' into bld dir '%s'." % (
options.srcdir, options.blddir)
subprocess.check_call(cmd)
if options.do_copy_bindir:
+ ensure_dir_exists(bld_dir_bin, keep=options.do_reuse_bindir,
+ backup=False)
+
print "Copying '%s' into '%s'." % (src_dir_bin, options.blddir)
cmd = [ "rsync",
"-aSH",
src_dir_bin, options.blddir ]
if options.verbose:
print "cmd: '%s'" % ' '.join(cmd)
+ subprocess.check_call(cmd)
else:
+ # symlinking would remove the need to copy results back and forth.
+ # but this is not yet usable right now.
+ rm_rf(bld_dir_bin)
+
print "Symlinking '%s' into '%s'." % (src_dir_bin, options.blddir)
cmd = [ "ln", "-sf", src_dir_bin, options.blddir ]
+ if options.verbose:
+ print "cmd: '%s'" % ' '.join(cmd)
+ subprocess.check_call(cmd)
- subprocess.check_call(cmd)
rm_rf("%s/bin" % options.blddir)
cmd = [ "ln", "-sf", options.bindir, "%s/bin" % options.blddir ]