adjust whitespace in shell scripts

This commit is contained in:
Thirnearez 2017-10-06 18:31:19 +00:00 committed by Adam Tauber
parent 076cfe25d7
commit 9224b3c3f0
1 changed files with 17 additions and 17 deletions

View File

@ -25,29 +25,29 @@ install_geckodriver() {
geckodriver -V > /dev/null 2>&1 || NOTFOUND=1 geckodriver -V > /dev/null 2>&1 || NOTFOUND=1
set +e set +e
if [ -z "$NOTFOUND" ]; then if [ -z "$NOTFOUND" ]; then
return return
fi fi
GECKODRIVER_VERSION="v0.18.0" GECKODRIVER_VERSION="v0.18.0"
PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`" PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
case "$PLATFORM" in case "$PLATFORM" in
"linux 32bit" | "linux2 32bit") ARCH="linux32";; "linux 32bit" | "linux2 32bit") ARCH="linux32";;
"linux 64bit" | "linux2 64bit") ARCH="linux64";; "linux 64bit" | "linux2 64bit") ARCH="linux64";;
"windows 32 bit") ARCH="win32";; "windows 32 bit") ARCH="win32";;
"windows 64 bit") ARCH="win64";; "windows 64 bit") ARCH="win64";;
"mac 64bit") ARCH="macos";; "mac 64bit") ARCH="macos";;
esac esac
GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz"; GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
if [ -z "$1" ]; then if [ -z "$1" ]; then
if [ -z "$VIRTUAL_ENV" ]; then if [ -z "$VIRTUAL_ENV" ]; then
echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n $GECKODRIVER_URL" echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n $GECKODRIVER_URL"
exit exit
else else
GECKODRIVER_DIR="$VIRTUAL_ENV/bin" GECKODRIVER_DIR="$VIRTUAL_ENV/bin"
fi fi
else else
GECKODRIVER_DIR="$1" GECKODRIVER_DIR="$1"
mkdir -p -- "$GECKODRIVER_DIR" mkdir -p -- "$GECKODRIVER_DIR"
fi fi
echo "Installing $GECKODRIVER_DIR/geckodriver from\n $GECKODRIVER_URL" echo "Installing $GECKODRIVER_DIR/geckodriver from\n $GECKODRIVER_URL"