[Openvpn-devel] [PATCH v4] reformat-shell.sh: Add --simplify argument

Gert Doering <[email protected]>
Newsgroups net.sourceforge.lists.openvpn-devel
Message-ID <[email protected]>
From: Frank Lichtenheld <[email protected]>

And apply the changes.

Change-Id: Id4d04bebdb8b2cb56e8dd16a386c41fdb95c0413
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Razvan Cojocaru <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1794
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1794
This mail reflects revision 4 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <[email protected]>

        
diff --git a/dev-tools/reformat-shell.sh b/dev-tools/reformat-shell.sh
index dbbdaa9..d76eae7 100755
--- a/dev-tools/reformat-shell.sh
+++ b/dev-tools/reformat-shell.sh
@@ -5,7 +5,7 @@
 
 set -u
 
-FORMAT_ARGS="--indent=4 --func-next-line --case-indent"
+FORMAT_ARGS="--simplify --indent=4 --func-next-line --case-indent"
 FORMAT_CMD="shfmt --list --write"
 
 # hardcoded to --posix due to .in filename and invalid shebang
diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 305441be..230a273 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -155,7 +155,7 @@
 fail()
 {
     output "FAIL: $@\n"
-    fail_count=$(($fail_count + 1))
+    fail_count=$((fail_count + 1))
 }
 
 # print "all interface IP addresses" + "all routes"
@@ -386,7 +386,7 @@
             ovpn_init_check=0
             ovpn_init_success=1
         fi
-        ovpn_init_check=$(($ovpn_init_check - 1))
+        ovpn_init_check=$((ovpn_init_check - 1))
     done
 
     opid=$(cat $pidfile)
diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh
index 058206f..ec0a220 100755
--- a/tests/t_lpback.sh
+++ b/tests/t_lpback.sh
@@ -59,13 +59,13 @@
                 ;;
         esac
         e=1
-        tests_failed=$(($tests_failed + 1))
+        tests_failed=$((tests_failed + 1))
     else
         case $V in
             0 | 1) ;;       # no per-test output for 'OK'
             *) echo "OK" ;; # print all
         esac
-        tests_passed=$(($tests_passed + 1))
+        tests_passed=$((tests_passed + 1))
     fi
 }
 
diff --git a/tests/t_net.sh b/tests/t_net.sh
index 17e028e..d63f648 100755
--- a/tests/t_net.sh
+++ b/tests/t_net.sh
@@ -162,7 +162,7 @@
 # remove interface for good
 $RUN_SUDO ip link del $IFACE
 
-for i in $(seq $(($LAST_AUTO_TEST + 1)) ${LAST_TEST}); do
+for i in $(seq $((LAST_AUTO_TEST + 1)) ${LAST_TEST}); do
     $RUN_SUDO $UNIT_TEST $i
     if [ $? -ne 0 ]; then
         echo "unit-test $i errored out"
diff --git a/tests/t_server_null_client.sh b/tests/t_server_null_client.sh
index 3203cc2..9f4168b 100755
--- a/tests/t_server_null_client.sh
+++ b/tests/t_server_null_client.sh
@@ -164,7 +164,7 @@
             continue
         fi
         if $RUN_SUDO kill -0 $server_pid >/dev/null 2>&1; then
-            servers_up=$(($servers_up + 1))
+            servers_up=$((servers_up + 1))
         fi
     done
 


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.