~kvik/clone

d853d8cb18c145519ab464fc47bc8d14bc6439f9 — kvik 4 years ago d98a4af v2-wip
Quote filenames
1 files changed, 7 insertions(+), 2 deletions(-)

M clone.c
M clone.c => clone.c +7 -2
@@ 21,6 21,9 @@ void
main(int argc, char *argv[])
{
	enum {Direct, Proto} mode = Direct;

	quotefmtinstall();

	ARGBEGIN{
	case 'a':
		archival = 1; break;


@@ 47,14 50,16 @@ main(int argc, char *argv[])
void
mkdir(char *dst, Dir *)
{
	print("mkdir -p %s\n", dst);
	print("mkdir -p %#q\n", dst);
}

void
cp(char *src, char *dst, Dir *)
{
	static int N = 0;
	print("test %s -nt %s && fcp %s %s &\n", src, dst, src, dst);
	if(update)
		print("test %#q -nt %#q && ", src, dst);
	print("fcp %#q %#q &\n", src, dst);
	if(N++ % 8 == 0)
		print("wait\n");
}