selftests: gpio: gpio-sim: remove bashisms
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 13 Dec 2021 16:23:55 +0000 (17:23 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Fri, 17 Dec 2021 11:26:13 +0000 (12:26 +0100)
'==' is a bashisms and not understood by POSIX shell. Drop it from
gpio-sim selftests.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
tools/testing/selftests/gpio/gpio-sim.sh

index d335a975890cb00c1e61a96f62706ad31e2c8102..c913d5aec768d367cacab80cf77d831c3008a6e7 100755 (executable)
@@ -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 || \