From 1d4d0aae92057cba8137c8fd5d733b3fa59071f1 Mon Sep 17 00:00:00 2001 From: sijanec Date: Sun, 17 May 2020 00:01:46 +0200 Subject: added custom extension for destination for compose-hmtl --- test/compose-all-in-dir.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/compose-all-in-dir.c b/test/compose-all-in-dir.c index 489891b..8805b0d 100644 --- a/test/compose-all-in-dir.c +++ b/test/compose-all-in-dir.c @@ -6,14 +6,17 @@ #include #include extern int main(int argc, char* argv[]) { - if(argc != 3) { - printf("usage: %s source-dir/ destination-dir/ (trailing slash mandatory)\n", argv[0]); + if(argc != 3 && argc != 4) { + printf("usage: %s source-dir/ destination-dir/ [destination .extension=.html]\n", argv[0]); return 1; } + char* destination_extension = ".html"; + if(argc == 4) { + destination_extension = argv[3]; + } char* source_folder_name = argv[1]; char* destination_folder_name = argv[2]; char* file_extension = ".bvr"; - char* destination_extension = ".html"; char* file_extension2 = ".bverbose"; // unofficial char source_filename[NAME_MAX]; char destination_filename[NAME_MAX]; -- cgit v1.2.3