minor improvement to be able to run the script from any location
[integration/test.git] / test / tools / odl-mdsal-clustering-tests / clustering-performance-test / ovs-scripts / get-total-found.sh
index d68728aec21cf9ff3ea979074538b3aa62f49481..c1792a794c9a5d4992702abb1dd5c23d14101035 100755 (executable)
@@ -9,14 +9,15 @@ ECHO=`which echo`
 
 TOTAL=0
 i=1
+dname=`dirname $0`
 
 while true;
 do
-    CUR=$((`./OVS-dump-flows.sh.13 s$i 2> /dev/null |  grep -v "flags=\[more\]" | wc -l` - 1))
+    CUR=$((`${dname}/OVS-dump-flows.sh.13 s$i 2> /dev/null |  grep -v "flags=\[more\]" | wc -l` - 1))
 
     if [ "$CUR" == "-1" ];
-    then 
-       break
+    then
+        break
     else
         printf "Switch s%d: %d flows\n" $i $CUR
         TOTAL=$(($TOTAL + $CUR))
@@ -24,4 +25,5 @@ do
     fi
 done
 
-printf "\nTotal: %d\n\n" $TOTAL
\ No newline at end of file
+printf "\nTotal: %d\n\n" $TOTAL
+