Commit e9b0fd77 authored by Lev Walkin's avatar Lev Walkin

some shellcheck recommendations

parent 92876d38
...@@ -21,15 +21,15 @@ fi ...@@ -21,15 +21,15 @@ fi
for ref in ${top_srcdir}/tests/*.asn1.-*; do for ref in ${top_srcdir}/tests/*.asn1.-*; do
# Figure out the initial source file used to generate this output. # Figure out the initial source file used to generate this output.
src=`echo "$ref" | sed -e 's/\.-[-a-zA-Z0-9=]*$//'` src=$(echo "$ref" | sed -e 's/\.-[-a-zA-Z0-9=]*$//')
# Figure out compiler flags used to create the file. # Figure out compiler flags used to create the file.
flags=`echo "$ref" | sed -e 's/.*\.-//'` flags=$(echo "$ref" | sed -e 's/.*\.-//')
echo "Checking $src against $ref" echo "Checking $src against $ref"
template=.tmp.check-parsing.$$ template=.tmp.check-parsing.$$
oldversion=${template}.old oldversion=${template}.old
newversion=${template}.new newversion=${template}.new
PROCESSING="$ref (from $src)" PROCESSING="$ref (from $src)"
cat "$ref" | LANG=C sed -e 's/^found in .*/found in .../' > $oldversion LANG=C sed -e 's/^found in .*/found in .../' < "$ref" > "$oldversion"
(./asn1c -S ${top_srcdir}/skeletons "-$flags" "$src" | LANG=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$? (./asn1c -S ${top_srcdir}/skeletons "-$flags" "$src" | LANG=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$?
if [ $? = 0 ]; then if [ $? = 0 ]; then
diff $diffArgs "$oldversion" "$newversion" || ec=$? diff $diffArgs "$oldversion" "$newversion" || ec=$?
......
...@@ -24,7 +24,7 @@ cat<<EOM > $ORIG ...@@ -24,7 +24,7 @@ cat<<EOM > $ORIG
EOM EOM
./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1 ./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
diff $diffArgs $ORIG $TEST >/dev/null 2>&1 diff $diffArgs "$ORIG" "$TEST" >/dev/null 2>&1
diffExitCode=$? diffExitCode=$?
if [ "$diffExitCode" = "0" ]; then if [ "$diffExitCode" = "0" ]; then
...@@ -38,7 +38,7 @@ echo '</I O="34" T="[UNIVERSAL 0]" TL="2" L="36">' >> $ORIG ...@@ -38,7 +38,7 @@ echo '</I O="34" T="[UNIVERSAL 0]" TL="2" L="36">' >> $ORIG
# Try trancoding again # Try trancoding again
./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1 ./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
diff $diffArgs $ORIG $TEST diff $diffArgs "$ORIG" "$TEST"
diffExitCode=$? diffExitCode=$?
rm -f $ORIG $TEST rm -f $ORIG $TEST
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment