lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 325dc9f 11/12: Resolve all shellcheck "SC2129


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 325dc9f 11/12: Resolve all shellcheck "SC2129" warnings
Date: Sun, 12 May 2019 22:25:17 -0400 (EDT)

branch: master
commit 325dc9fcb13bc13ea107ea1ea2a3c4c4ecc1e742
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Resolve all shellcheck "SC2129" warnings
---
 local_options.sh | 10 ++++++----
 test_schemata.sh | 46 ++++++++++++++++++++++++----------------------
 2 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/local_options.sh b/local_options.sh
index a0d7ec1..a5a2395 100755
--- a/local_options.sh
+++ b/local_options.sh
@@ -52,10 +52,12 @@
 #     [2005-01-17T18:15:26Z from Aaron W. LaFramboise]
 # when multiple versions of MinGW gcc are installed.
 
-echo "# Copyright (C) $(date -u +'%Y') [you]."    > local_options.make
-echo "# http://savannah.nongnu.org/projects/lmi"; >> local_options.make
-echo ""                                          >> local_options.make
-echo "# Local options"                           >> local_options.make
+{
+  echo "# Copyright (C) $(date -u +'%Y') [you]."
+  echo "# http://savannah.nongnu.org/projects/lmi";
+  echo ""
+  echo "# Local options"
+} > local_options.make
 for z in "$@"
   do
     echo "$z" \
diff --git a/test_schemata.sh b/test_schemata.sh
index a3cd637..af2a59b 100755
--- a/test_schemata.sh
+++ b/test_schemata.sh
@@ -165,17 +165,18 @@ EOF
 echo "  Test invalid input: '.cns'."
 
 <sample.cns >sample_bad.cns sed --file=eraseme.sed
-rm --force cns.eraseme
-echo "  invalid input, jing, .rnc:"                                      >> 
cns.eraseme 2>&1
-java -jar $jar_dir/jing.jar -c multiple_cell_document.rnc sample_bad.cns >> 
cns.eraseme 2>&1
-echo "  invalid input, jing, .xsd:"                                      >> 
cns.eraseme 2>&1
-java -jar $jar_dir/jing.jar multiple_cell_document.xsd    sample_bad.cns >> 
cns.eraseme 2>&1
-echo "  invalid input, xmllint, .xsd:"                                   >> 
cns.eraseme 2>&1
-xmllint --noout --schema multiple_cell_document.xsd       sample_bad.cns >> 
cns.eraseme 2>&1
-echo "  invalid input, jing, .rng:"                                      >> 
cns.eraseme 2>&1
-java -jar $jar_dir/jing.jar multiple_cell_document.rng    sample_bad.cns >> 
cns.eraseme 2>&1
-echo "  invalid input, xmllint, .rng:"                                   >> 
cns.eraseme 2>&1
-xmllint --noout --relaxng multiple_cell_document.rng      sample_bad.cns >> 
cns.eraseme 2>&1
+{
+  echo "  invalid input, jing, .rnc:"
+  java -jar $jar_dir/jing.jar -c multiple_cell_document.rnc sample_bad.cns
+  echo "  invalid input, jing, .xsd:"
+  java -jar $jar_dir/jing.jar multiple_cell_document.xsd    sample_bad.cns
+  echo "  invalid input, xmllint, .xsd:"
+  xmllint --noout --schema multiple_cell_document.xsd       sample_bad.cns
+  echo "  invalid input, jing, .rng:"
+  java -jar $jar_dir/jing.jar multiple_cell_document.rng    sample_bad.cns
+  echo "  invalid input, xmllint, .rng:"
+  xmllint --noout --relaxng multiple_cell_document.rng      sample_bad.cns
+} > cns.eraseme 2>&1
 sed -e 's/^.*error: //;s/\.cns fails/ fails/;s/  *$//' -i cns.eraseme
 sed -e 's/^.*Schemas validity error : //' -i cns.eraseme
 sed -e 's/^.*Relax-NG validity error : //' -i cns.eraseme
@@ -184,17 +185,18 @@ diff --unified=0 touchstone.eraseme cns.eraseme
 echo "  Test invalid input: '.ill'."
 
 <sample.ill >sample_bad.ill sed --file=eraseme.sed
-rm --force ill.eraseme
-echo "  invalid input, jing, .rnc:"                                      >> 
ill.eraseme 2>&1
-java -jar $jar_dir/jing.jar -c single_cell_document.rnc   sample_bad.ill >> 
ill.eraseme 2>&1
-echo "  invalid input, jing, .xsd:"                                      >> 
ill.eraseme 2>&1
-java -jar $jar_dir/jing.jar single_cell_document.xsd      sample_bad.ill >> 
ill.eraseme 2>&1
-echo "  invalid input, xmllint, .xsd:"                                   >> 
ill.eraseme 2>&1
-xmllint --noout --schema single_cell_document.xsd         sample_bad.ill >> 
ill.eraseme 2>&1
-echo "  invalid input, jing, .rng:"                                      >> 
ill.eraseme 2>&1
-java -jar $jar_dir/jing.jar single_cell_document.rng      sample_bad.ill >> 
ill.eraseme 2>&1
-echo "  invalid input, xmllint, .rng:"                                   >> 
ill.eraseme 2>&1
-xmllint --noout --relaxng single_cell_document.rng        sample_bad.ill >> 
ill.eraseme 2>&1
+{
+  echo "  invalid input, jing, .rnc:"
+  java -jar $jar_dir/jing.jar -c single_cell_document.rnc   sample_bad.ill
+  echo "  invalid input, jing, .xsd:"
+  java -jar $jar_dir/jing.jar single_cell_document.xsd      sample_bad.ill
+  echo "  invalid input, xmllint, .xsd:"
+  xmllint --noout --schema single_cell_document.xsd         sample_bad.ill
+  echo "  invalid input, jing, .rng:"
+  java -jar $jar_dir/jing.jar single_cell_document.rng      sample_bad.ill
+  echo "  invalid input, xmllint, .rng:"
+  xmllint --noout --relaxng single_cell_document.rng        sample_bad.ill
+} > ill.eraseme 2>&1
 sed -e 's/^.*error: //;s/\.ill fails/ fails/;s/  *$//' -i ill.eraseme
 sed -e 's/^.*Schemas validity error : //' -i ill.eraseme
 sed -e 's/^.*Relax-NG validity error : //' -i ill.eraseme



reply via email to

[Prev in Thread] Current Thread [Next in Thread]