Changeset 40c0483 in mainline for tools/ccheck.sh


Ignore:
Timestamp:
2019-08-16T20:58:02Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d3db35b
Parents:
5284faa
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-21 14:03:59)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-16 20:58:02)
Message:

Make shell script tools more portable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ccheck.sh

    r5284faa r40c0483  
    1 #!/bin/bash
     1#!/bin/sh
    22#
    33# Copyright (c) 2018 Jiri Svoboda
     
    3333fi
    3434
    35 if [ ."$1" == .--fix ] ; then
     35if [ ."$1" = .--fix ]; then
    3636        opt=--fix
    3737else
     
    4949        outfile="$(mktemp)"
    5050        "$ccheck" $opt $fname >"$outfile" 2>&1
    51         rc=$?
    52         if [ .$rc == .0 ]; then
     51        if [ $? -eq 0 ]; then
    5352                if [ -s "$outfile" ] ; then
    5453                        srepcnt=$((srepcnt + 1))
     
    6564done
    6665
    67 if [ $srepcnt == 0 -a $fcnt == 0 ] ; then
     66if [ $srepcnt -eq 0 ] && [ $fcnt -eq 0 ]; then
    6867        echo "Ccheck passed."
    6968else
Note: See TracChangeset for help on using the changeset viewer.