Browse Source

For portability, use = instead of == in bash scripts

Ian Goldberg 1 year ago
parent
commit
549e8b3247
1 changed files with 8 additions and 8 deletions
  1. 8 8
      repro

+ 8 - 8
repro

@@ -27,14 +27,14 @@ fi
 # cores to generate it.)  You can also say "single" followed by all the
 # arguments to "run" (below) to run a single experiment; for example:
 # ./repro single readwrite 20 1us 100gbit 128
-if [ "$1" == "" ]; then
+if [ "$1" = "" ]; then
     whichexps="test"
 else
     whichexps="$1"
 fi
 
 # The number of operations per run; the graphs in the paper use 128
-if [ "$whichexps" == "single" -o "$2" == "" ]; then
+if [ "$whichexps" = "single" -o "$2" = "" ]; then
     # If there's an explicit experiment on the command line, don't read
     # the next argument as the number of operations.  $numops will be
     # ignored, anyway, since it will be specified as part of the
@@ -69,7 +69,7 @@ parse() {
 
 # A very small kick-the-tires test to ensure everything compiled and
 # built properly
-if [ "$whichexps" == "test" ]; then
+if [ "$whichexps" = "test" ]; then
     echo "Running test experiment..."
     run read 16 1us 100gbit 2
     parse read_1us_100gbit_2.out${LOGSUFFIX}
@@ -77,7 +77,7 @@ if [ "$whichexps" == "test" ]; then
 fi
 
 # Be able to run a single experiment specified on the command line
-if [ "$whichexps" == "single" ]; then
+if [ "$whichexps" = "single" ]; then
     echo "Running single experiment..."
     shift
     run $*
@@ -87,7 +87,7 @@ fi
 now=`date`
 echo "$now: Starting experiments"
 
-if [ "$whichexps" == "small" -o "$whichexps" == "all" ]; then
+if [ "$whichexps" = "small" -o "$whichexps" = "all" ]; then
     echo "Running small experiments..."
     # Figure 7(a), 8(c)
     run readwrite 16 30ms 100mbit ${numops}
@@ -130,13 +130,13 @@ if [ "$whichexps" == "small" -o "$whichexps" == "all" ]; then
     run read 22 30ms 100mbit ${numops}
     run read 24 30ms 100mbit ${numops}
 fi
-if [ "$whichexps" == "small" -o "$whichexps" == "scaling" -o "$whichexps" == "all" ]; then
+if [ "$whichexps" = "small" -o "$whichexps" = "scaling" -o "$whichexps" = "all" ]; then
     # Figures 9(a), 10
     run read 16 30ms 100mbit ${numops}
     run read 20 30ms 100mbit ${numops}
     run read 26 30ms 100mbit ${numops}
 fi
-if [ "$whichexps" == "large" -o "$whichexps" == "all" ]; then
+if [ "$whichexps" = "large" -o "$whichexps" = "all" ]; then
     echo "Running large experiments..."
     # Figure 9(a)
     run read 28 30ms 100mbit ${numops}
@@ -153,7 +153,7 @@ echo "$now: Experiments complete"
 
 # If you specified a custom log suffix, you're going to be parsing the
 # outputs differently.
-if [ "$LOGSUFFIX" == "" ]; then
+if [ "$LOGSUFFIX" = "" ]; then
 
 parse *_${numops}.out > floram_${numops}.dat