]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
test-pkg: filter empty lines and comments in CSV file
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 29 Oct 2017 17:14:37 +0000 (18:14 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 27 Nov 2017 22:24:49 +0000 (23:24 +0100)
In preparation for the addition of comments in the CSV file listing
toolchain configurations, we filter out such lines when reading the
CSV file in utils/test-pkg.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
utils/test-pkg

index 6899d44f7cf5a9b46201a6ef34f8616000614656..1b7046eac46b3e97ea62805f0f99bbc43098f5be 100755 (executable)
@@ -54,7 +54,7 @@ main() {
     # Extract the URLs of the toolchains; drop internal toolchains
     # E.g.: http://server/path/to/name.config,arch,libc
     #  -->  http://server/path/to/name.config
-    toolchains=($(sed -r -e 's/,.*//; /internal/d;' "${toolchains_csv}" \
+    toolchains=($(sed -r -e 's/,.*//; /internal/d; /^#/d; /^$/d;' "${toolchains_csv}" \
                   |if [ ${random} -gt 0 ]; then \
                       sort -R |head -n ${random}
                    else