From 453e8f27ced864cb9b4d2a532f017fcc6a86028a Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Sun, 30 Oct 2022 12:17:17 +0000 Subject: add cpack to build debian package --- src/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index a009b21..339c078 100644 --- a/src/main.c +++ b/src/main.c @@ -16,6 +16,12 @@ #include #include +#ifndef _VERSION /* passed through cmake */ +#define VERSION "(unknown)" +#else +#define VERSION _VERSION +#endif + #define DEFAULT_MIN_CHUNK_SZ (64 << 20) /* 64MB */ #define DEFAULT_SFTP_BUF_SZ 131072 /* derived from qemu/block/ssh.c */ #define DEFAULT_IO_BUF_SZ DEFAULT_SFTP_BUF_SZ @@ -65,9 +71,10 @@ void stop_copy_threads(int sig) void usage(bool print_help) { - printf("mscp: copy files over multiple ssh connections\n" + printf("mscp v" VERSION ": copy files over multiple ssh connections\n" "\n" - "Usage: mscp [CvqDdh] [-n nr_conns] [-s min_chunk_sz] [-S max_chunk_sz]\n" + "Usage: mscp [CvqDdh] [-n nr_conns]\n" + " [-s min_chunk_sz] [-S max_chunk_sz]\n" " [-b sftp_buf_sz] [-B io_buf_sz]\n" " [-l login_name] [-p port] [-i identity_file]\n" " [-c cipher_spec] source ... target\n" -- cgit v1.2.3