From 4c995c4201370a54f5c9bceb3c74cff63d0f1ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Wed, 20 Dec 2017 18:42:06 +0100 Subject: [PATCH 1/2] remove the option of sourcing manage.sh --- manage.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/manage.sh b/manage.sh index cf31bb5..625b345 100755 --- a/manage.sh +++ b/manage.sh @@ -3,14 +3,6 @@ BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")" export PATH="$BASE_DIR/node_modules/.bin":$PATH -# the script can be sourced to update the PATH -# see https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced -if [ $_ != $0 ]; then - unset BASE_DIR - # sourced : exit now - return -fi - # subshell PYTHONPATH="$BASE_DIR" SEARX_DIR="$BASE_DIR/searx" From e2f15b33c49fb20a1a20a1fd56562214f12cc87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Wed, 21 Feb 2018 20:46:24 +0100 Subject: [PATCH 2/2] change echo to printf --- manage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manage.sh b/manage.sh index 625b345..cf144f8 100755 --- a/manage.sh +++ b/manage.sh @@ -48,7 +48,7 @@ install_geckodriver() { if [ -z "$1" ]; 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" + printf "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n %s" "$GECKODRIVER_URL" exit else GECKODRIVER_DIR="$VIRTUAL_ENV/bin" @@ -58,7 +58,7 @@ install_geckodriver() { mkdir -p -- "$GECKODRIVER_DIR" fi - echo "Installing $GECKODRIVER_DIR/geckodriver from\n $GECKODRIVER_URL" + printf "Installing %s/geckodriver from\n %s" "$GECKODRIVER_DIR" "$GECKODRIVER_URL" FILE="`mktemp`" wget -qO "$FILE" -- "$GECKODRIVER_URL" && tar xz -C "$GECKODRIVER_DIR" -f "$FILE" geckodriver