Skip to content

Commit

Permalink
selftests: gpio: gpio-sim: remove bashisms
Browse files Browse the repository at this point in the history
'==' is a bashisms and not understood by POSIX shell. Drop it from
gpio-sim selftests.

Signed-off-by: Bartosz Golaszewski <[email protected]>
  • Loading branch information
brgl committed Dec 17, 2021
1 parent 2ac5eb8 commit f7eda6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/gpio/gpio-sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ remove_chip() {

for FILE in $CONFIGFS_DIR/$CHIP/*; do
BANK=`basename $FILE`
if [ "$BANK" == "live" ] || [ "$BANK" == "dev_name" ]; then
if [ "$BANK" = "live" ] || [ "$BANK" = "dev_name" ]; then
continue
fi

LINES=`ls $CONFIGFS_DIR/$CHIP/$BANK/ | egrep ^line`
if [ "$?" == 0 ]; then
if [ "$?" = 0 ]; then
for LINE in $LINES; do
if [ -e $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog ]; then
rmdir $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog || \
Expand Down

0 comments on commit f7eda6f

Please sign in to comment.