3BASE_DIR=$(dirname "`readlink -f "$0"`")
5SEARX_DIR="$BASE_DIR/searx"
9 pip install -r "$BASE_DIR/requirements.txt"
12update_dev_packages() {
14 pip install -r "$BASE_DIR/requirements-dev.txt"
18 echo '[!] Checking geckodriver'
20 geckodriver -V 2>1 > /dev/null || NOTFOUND=1
22 if [ -z $NOTFOUND ]; then
25 GECKODRIVER_VERSION="v0.11.1"
26 PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"`
28 "linux 32bit" | "linux2 32bit") ARCH="linux32";;
29 "linux 64bit" | "linux2 64bit") ARCH="linux64";;
30 "windows 32 bit") ARCH="win32";;
31 "windows 64 bit") ARCH="win64";;
32 "mac 64bit") ARCH="macos";;
34 GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-$ARCH.tar.gz";
35 if [ -z "$VIRTUAL_ENV" ]; then
36 echo "geckodriver can't be installed because VIRTUAL_ENV is not set, you should download it from\n $GECKODRIVER_URL"
39 echo "Installing $VIRTUAL_ENV from\n $GECKODRIVER_URL"
41 wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C $VIRTUAL_ENV/bin/ -f $FILE geckodriver
43 chmod 777 $VIRTUAL_ENV/bin/geckodriver
48 echo '[!] Running pep8 check'
50 # E402 module level import not at top of file
51 # W503 line break before binary operator
52 pep8 --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
56 echo '[!] Running unit tests'
57 python -m nose2 -s "$BASE_DIR/tests/unit"
61 echo '[!] Running python test coverage'
62 PYTHONPATH=`pwd` python -m nose2 -C --coverage "$SEARX_DIR" -s "$BASE_DIR/tests/unit"
68 echo '[!] Running robot tests'
69 PYTHONPATH=`pwd` python "$SEARX_DIR/testing.py" robot
82 lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
86 echo '[!] Building styles'
87 build_style themes/legacy/less/style.less themes/legacy/css/style.css
88 build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
89 build_style themes/courgette/less/style.less themes/courgette/css/style.css
90 build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
91 build_style less/bootstrap/bootstrap.less css/bootstrap.min.css
92 build_style themes/oscar/less/pointhi/oscar.less themes/oscar/css/pointhi.min.css
93 build_style themes/oscar/less/logicodev/oscar.less themes/oscar/css/logicodev.min.css
94 build_style themes/pix-art/less/style.less themes/pix-art/css/style.css
98 grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
102 pybabel compile -d "$SEARX_DIR/translations"
106 [ -z "$1" ] || printf "Error: $1\n"
107 echo "Searx manage.sh help
111 grunt_build - Build js files
113 locales - Compile locales
114 pep8_check - Pep8 validation
115 py_test_coverage - Unit test coverage
116 robot_tests - Run selenium tests
117 styles - Build less files
118 tests - Run all python tests (pep8, unit, robot)
119 unit_tests - Run unit tests
120 update_dev_packages - Check & update development and production dependency changes
121 update_packages - Check & update dependency changes
122 check_geckodriver - Check & download geckodriver (required for robot_tests)
126[ "$(command -V "$ACTION" | grep ' function$')" = "" ] \
127 && help "action not found" \
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list