|  | @@ -25,33 +25,33 @@ install_geckodriver() {
 | 
	
		
			
			| 25 | 25 |      geckodriver -V > /dev/null 2>&1 || NOTFOUND=1
 | 
	
		
			
			| 26 | 26 |      set +e
 | 
	
		
			
			| 27 | 27 |      if [ -z "$NOTFOUND" ]; then
 | 
	
		
			
			| 28 |  | -	return
 | 
	
		
			
			|  | 28 | +        return
 | 
	
		
			
			| 29 | 29 |      fi
 | 
	
		
			
			| 30 | 30 |      GECKODRIVER_VERSION="v0.18.0"
 | 
	
		
			
			| 31 | 31 |      PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
 | 
	
		
			
			| 32 | 32 |      case "$PLATFORM" in
 | 
	
		
			
			| 33 |  | -	"linux 32bit" | "linux2 32bit") ARCH="linux32";;
 | 
	
		
			
			| 34 |  | -	"linux 64bit" | "linux2 64bit") ARCH="linux64";;
 | 
	
		
			
			| 35 |  | -	"windows 32 bit") ARCH="win32";;
 | 
	
		
			
			| 36 |  | -	"windows 64 bit") ARCH="win64";;
 | 
	
		
			
			| 37 |  | -	"mac 64bit") ARCH="macos";;
 | 
	
		
			
			|  | 33 | +        "linux 32bit" | "linux2 32bit") ARCH="linux32";;
 | 
	
		
			
			|  | 34 | +        "linux 64bit" | "linux2 64bit") ARCH="linux64";;
 | 
	
		
			
			|  | 35 | +        "windows 32 bit") ARCH="win32";;
 | 
	
		
			
			|  | 36 | +        "windows 64 bit") ARCH="win64";;
 | 
	
		
			
			|  | 37 | +        "mac 64bit") ARCH="macos";;
 | 
	
		
			
			| 38 | 38 |      esac
 | 
	
		
			
			| 39 | 39 |      GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
 | 
	
		
			
			| 40 | 40 |  
 | 
	
		
			
			| 41 | 41 |      if [ -z "$1" ]; then
 | 
	
		
			
			| 42 |  | -	if [ -z "$VIRTUAL_ENV" ]; then
 | 
	
		
			
			| 43 |  | -	    echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n  $GECKODRIVER_URL"
 | 
	
		
			
			| 44 |  | -	    exit    
 | 
	
		
			
			| 45 |  | -	else
 | 
	
		
			
			| 46 |  | -	    GECKODRIVER_DIR="$VIRTUAL_ENV/bin"
 | 
	
		
			
			| 47 |  | -	fi
 | 
	
		
			
			|  | 42 | +        if [ -z "$VIRTUAL_ENV" ]; then
 | 
	
		
			
			|  | 43 | +            echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n  $GECKODRIVER_URL"
 | 
	
		
			
			|  | 44 | +            exit
 | 
	
		
			
			|  | 45 | +        else
 | 
	
		
			
			|  | 46 | +            GECKODRIVER_DIR="$VIRTUAL_ENV/bin"
 | 
	
		
			
			|  | 47 | +        fi
 | 
	
		
			
			| 48 | 48 |      else
 | 
	
		
			
			| 49 |  | -	GECKODRIVER_DIR="$1"
 | 
	
		
			
			| 50 |  | -	mkdir -p -- "$GECKODRIVER_DIR"
 | 
	
		
			
			|  | 49 | +        GECKODRIVER_DIR="$1"
 | 
	
		
			
			|  | 50 | +        mkdir -p -- "$GECKODRIVER_DIR"
 | 
	
		
			
			| 51 | 51 |      fi
 | 
	
		
			
			| 52 | 52 |  
 | 
	
		
			
			| 53 | 53 |      echo "Installing $GECKODRIVER_DIR/geckodriver from\n  $GECKODRIVER_URL"
 | 
	
		
			
			| 54 |  | -    
 | 
	
		
			
			|  | 54 | +
 | 
	
		
			
			| 55 | 55 |      FILE="`mktemp`"
 | 
	
		
			
			| 56 | 56 |      wget -qO "$FILE" -- "$GECKODRIVER_URL" && tar xz -C "$GECKODRIVER_DIR" -f "$FILE" geckodriver
 | 
	
		
			
			| 57 | 57 |      rm -- "$FILE"
 | 
	
	
		
			
			|  | @@ -116,7 +116,7 @@ npm_packages() {
 | 
	
		
			
			| 116 | 116 |      cd -- "$BASE_DIR/searx/static/themes/oscar"
 | 
	
		
			
			| 117 | 117 |      npm install
 | 
	
		
			
			| 118 | 118 |  
 | 
	
		
			
			| 119 |  | -    echo '[!] install NPM packages for simple theme'    
 | 
	
		
			
			|  | 119 | +    echo '[!] install NPM packages for simple theme'
 | 
	
		
			
			| 120 | 120 |      cd -- "$BASE_DIR/searx/static/themes/simple"
 | 
	
		
			
			| 121 | 121 |      npm install
 | 
	
		
			
			| 122 | 122 |  }
 | 
	
	
		
			
			|  | @@ -124,7 +124,7 @@ npm_packages() {
 | 
	
		
			
			| 124 | 124 |  grunt_build() {
 | 
	
		
			
			| 125 | 125 |      echo '[!] Grunt build : oscar theme'
 | 
	
		
			
			| 126 | 126 |      grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
 | 
	
		
			
			| 127 |  | -    echo '[!] Grunt build : simple theme'    
 | 
	
		
			
			|  | 127 | +    echo '[!] Grunt build : simple theme'
 | 
	
		
			
			| 128 | 128 |      grunt --gruntfile "$SEARX_DIR/static/themes/simple/gruntfile.js"
 | 
	
		
			
			| 129 | 129 |  }
 | 
	
		
			
			| 130 | 130 |  
 |