From: YAMAMOTO Takashi <[email protected]>

/bin/bash is not so ubiquitous.

Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 run_tests.sh       | 22 +++++++++++-----------
 tools/with_venv.sh |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/run_tests.sh b/run_tests.sh
index a00d2a8..56609d2 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 
-function usage {
+usage() {
   echo "Usage: $0 [OPTION]..."
   echo "Run Ryu's test suite(s)"
   echo ""
@@ -20,15 +20,15 @@ function usage {
   exit
 }
 
-function process_option {
+process_option() {
   case "$1" in
     -h|--help) usage;;
-    -V|--virtual-env) let always_venv=1; let never_venv=0;;
-    -N|--no-virtual-env) let always_venv=0; let never_venv=1;;
-    -f|--force) let force=1;;
-    -p|--pep8) let just_pep8=1;let never_venv=1; let always_venv=0;;
+    -V|--virtual-env) always_venv=1; never_venv=0;;
+    -N|--no-virtual-env) always_venv=0; never_venv=1;;
+    -f|--force) force=1;;
+    -p|--pep8) just_pep8=1; never_venv=1; always_venv=0;;
     -P|--no-pep8) no_pep8=1;;
-    -l|--pylint) let just_pylint=1;;
+    -l|--pylint) just_pylint=1;;
     -c|--coverage) coverage=1;;
     -v|--verbose) verbose=1;;
     -*) noseopts="$noseopts $1";;
@@ -58,7 +58,7 @@ if [ $coverage -eq 1 ]; then
     noseopts="$noseopts --with-coverage --cover-package=ryu"
 fi
 
-function run_tests {
+run_tests() {
   # Just run the test suites in current environment
   ${wrapper} rm -f ./$PLUGIN_DIR/tests.sqlite
 
@@ -80,7 +80,7 @@ function run_tests {
   return $RESULT
 }
 
-function run_pylint {
+run_pylint() {
   echo "Running pylint ..."
   PYLINT_OPTIONS="--rcfile=.pylintrc --output-format=parseable"
   PYLINT_INCLUDE="ryu bin/ryu-manager bin/ryu-client"
@@ -96,7 +96,7 @@ function run_pylint {
   export PYTHONPATH=$OLD_PYTHONPATH
 }
 
-function run_pep8 {
+run_pep8() {
   echo "Running pep8 ..."
 
   PEP8_EXCLUDE="vcsversion.py,*.pyc,contrib"
diff --git a/tools/with_venv.sh b/tools/with_venv.sh
index 93eaa88..311ab61 100755
--- a/tools/with_venv.sh
+++ b/tools/with_venv.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
 # Copyright 2011 OpenStack LLC.
@@ -18,4 +18,4 @@
 
 TOOLS=`dirname $0`
 VENV=$TOOLS/../.venv
-source $VENV/bin/activate && $@
+. $VENV/bin/activate && $@
-- 
1.7.12


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to