From c604d6dffb4f8d6fb1d38a70c0e6a31ba2e534df Mon Sep 17 00:00:00 2001 From: Karl-Hermann Wieners <karl-hermann.wieners@mpimet.mpg.de> Date: Wed, 5 Jun 2024 18:38:56 +0200 Subject: [PATCH] Import: improve file section labels (dir + method) --- CHANGES.rst | 1 + files2config | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3a43cc4..308523c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -27,6 +27,7 @@ Tools * support different generations of launch logic * support stand-alone atmosphere scripts * add option to set path to helper script + * improve file section labels * setconfig: make output more similar to mkexp conventions * remove quotes from section names (may be disabled) * fix spaces before inline comments when no value is given diff --git a/files2config b/files2config index 1903ba6..129ad61 100755 --- a/files2config +++ b/files2config @@ -98,7 +98,6 @@ sub subst_value($) { } unless($direct) { - my $i = 0; print("[files]\n"); my $last_mtd = ''; my $last_dir = ''; @@ -106,7 +105,7 @@ unless($direct) { my ($mtd, $dir, $src, $dst) = @{$file_info{$key}}; if($last_dir ne $dir || $last_mtd ne $mtd) { my $subst_dir = subst_value($dir); - printf(" [[section_%02d]]\n", ++$i); + print(" [[$subst_dir $mtd]]\n"); print(" .base_dir = $subst_dir\n"); print(" .method = $mtd\n"); } -- GitLab