| #!/bin/bash |
| |
| # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This script strips the extraneous " characters from the --user-data-dir |
| # option that selenium passes. |
| |
| args="" |
| # Selenium passes empty arguments, so we can't use [ -n "$1" ] to detect the |
| # end. Hard-code the maximum number of arguments. |
| for i in `seq 1 15` ; do |
| if echo "$1" | grep -- '--user-data-dir' > /dev/null; then |
| arg=$(echo "$1" |sed -e 's/"//g') |
| args="$args $arg" |
| else |
| args="$args $1" |
| fi |
| shift |
| done |
| |
| exec /opt/google/chrome/chrome $args |