@@ -3,14 +3,6 @@
33BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
44export PATH="$BASE_DIR/node_modules/.bin":$PATH
55
6−# the script can be sourced to update the PATH
7−# see https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced
8−if [ $_ != $0 ]; then
9− unset BASE_DIR
10− # sourced : exit now
11− return
12−fi
13−
146# subshell
157PYTHONPATH="$BASE_DIR"
168SEARX_DIR="$BASE_DIR/searx"
@@ -56,7 +48,7 @@ install_geckodriver() {
5648
5749 if [ -z "$1" ]; then
5850 if [ -z "$VIRTUAL_ENV" ]; then
59− echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n $GECKODRIVER_URL"
51+ printf "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n %s" "$GECKODRIVER_URL"
6052 exit
6153 else
6254 GECKODRIVER_DIR="$VIRTUAL_ENV/bin"
@@ -66,7 +58,7 @@ install_geckodriver() {
6658 mkdir -p -- "$GECKODRIVER_DIR"
6759 fi
6860
69− echo "Installing $GECKODRIVER_DIR/geckodriver from\n $GECKODRIVER_URL"
61+ printf "Installing %s/geckodriver from\n %s" "$GECKODRIVER_DIR" "$GECKODRIVER_URL"
7062
7163 FILE="`mktemp`"
7264 wget -qO "$FILE" -- "$GECKODRIVER_URL" && tar xz -C "$GECKODRIVER_DIR" -f "$FILE" geckodriver