Repository: kafka Updated Branches: refs/heads/trunk 7cfdf19b5 -> 4f8ad1561
MINOR: Fix Vagrant setup script for use on Fedora I tested and verified that `vagrant --version | egrep -o "\d+\.\d+\.\d+"` works on Mac but failed on RedHad 6.4, while `vagrant --version | egrep -o "[0-9]\.[0-9]\.[0-9]"` works on both OS. Author: Dong Lin <[email protected]> Reviewers: Geoff Anderson, Guozhang Wang Closes #246 from lindong28/Vagrant-setup-on-Fedora Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/4f8ad156 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4f8ad156 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4f8ad156 Branch: refs/heads/trunk Commit: 4f8ad1561c761dd3ced22a5b8e2a6fa5e77283f2 Parents: 7cfdf19 Author: Dong Lin <[email protected]> Authored: Fri Oct 2 15:07:28 2015 -0700 Committer: Guozhang Wang <[email protected]> Committed: Fri Oct 2 15:07:28 2015 -0700 ---------------------------------------------------------------------- tests/bootstrap-test-env.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/4f8ad156/tests/bootstrap-test-env.sh ---------------------------------------------------------------------- diff --git a/tests/bootstrap-test-env.sh b/tests/bootstrap-test-env.sh index e12643a..2a27628 100755 --- a/tests/bootstrap-test-env.sh +++ b/tests/bootstrap-test-env.sh @@ -32,7 +32,7 @@ else fi echo "Checking Vagrant installation..." -vagrant_version=`vagrant --version | egrep -o "\d+\.\d+\.\d+"` +vagrant_version=`vagrant --version | egrep -o "[0-9]+\.[0-9]+\.[0-9]+"` bad_vagrant=false if [ "$(version $vagrant_version)" -lt "$(version 1.6.4)" ]; then echo "Found Vagrant version $vagrant_version. Please upgrade to 1.6.4 or higher (see http://www.vagrantup.com for details)" @@ -47,7 +47,7 @@ fi echo "Checking for necessary Vagrant plugins..." install_hostmanager=false -hostmanager_version=`vagrant plugin list | grep vagrant-hostmanager | egrep -o "\d+\.\d+\.\d+"` +hostmanager_version=`vagrant plugin list | grep vagrant-hostmanager | egrep -o "[0-9]+\.[0-9]+\.[0-9]+"` if [ -z "$hostmanager_version" ]; then install_hostmanager=true elif [ "$hostmanager_version" != "1.5.0" ]; then @@ -73,9 +73,9 @@ fi # Sanity check contents of Vagrantfile.local echo "Checking Vagrantfile.local..." vagrantfile_ok=true -num_brokers=`egrep -o "num_brokers\s*=\s*\d+" Vagrantfile.local | cut -d '=' -f 2 | xargs` -num_zookeepers=`egrep -o "num_zookeepers\s*=\s*\d+" Vagrantfile.local | cut -d '=' -f 2 | xargs` -num_workers=`egrep -o "num_workers\s*=\s*\d+" Vagrantfile.local | cut -d '=' -f 2 | xargs` +num_brokers=`egrep -o "num_brokers\s*=\s*[0-9]+" Vagrantfile.local | cut -d '=' -f 2 | xargs` +num_zookeepers=`egrep -o "num_zookeepers\s*=\s*[0-9]+" Vagrantfile.local | cut -d '=' -f 2 | xargs` +num_workers=`egrep -o "num_workers\s*=\s*[0-9]+" Vagrantfile.local | cut -d '=' -f 2 | xargs` if [ "x$num_brokers" == "x" -o "$num_brokers" != 0 ]; then echo "Vagrantfile.local: bad num_brokers. Update to: num_brokers = 0" vagrantfile_ok=false
