123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #!/bin/bash
- VERSION="0.3-beta1"
- TMP_PATH="/tmp/searx-qt-tmp-build/"
- SEARXQT_GIT=${SEARXQT_GIT:=0}
- DEP_BUILD="python3-stdeb gettext pyqt5-dev-tools"
- if [[ $SEARXQT_GIT -eq 0 ]]; then
- DEP_BUILD+=" wget"
- else
- DEP_BUILD+=" git"
- fi
- echo "# Install build dependencies:"
- sudo apt install $DEP_BUILD
- if [[ $? -ne 0 ]]; then
- echo "Failed to install build dependencies."
- exit 1
- fi
- echo "# Install runtime dependencies:"
- sudo apt install python3 python3-requests python3-pyqt5 python3-socks
- if [[ $? -ne 0 ]]; then
- echo "Failed to install runtime dependencies."
- exit 1
- fi
- if [ -d "$TMP_PATH" ]; then
- rm -rf "$TMP_PATH"
- fi
- mkdir "$TMP_PATH"
- if [[ $? -ne 0 ]]; then
- echo "Failed to create temporary build path."
- exit 1
- fi
- cd "$TMP_PATH"
- if [[ $SEARXQT_GIT -eq 0 ]]; then
- wget "https://notabug.org/CYBERDEViL/searx-qt/archive/$VERSION.tar.gz"
- if [[ $? -ne 0 ]]; then
- echo "Failed to download the source."
- exit 1
- fi
-
- tar -xvf "$VERSION.tar.gz"
- if [[ $? -ne 0 ]]; then
- echo "Failed to extract the source."
- exit 1
- fi
- cd searx-qt
- else
- git clone "https://notabug.org/CYBERDEViL/searx-qt"
- if [[ $? -ne 0 ]]; then
- echo "Failed to download the source from git."
- exit 1
- fi
- cd searx-qt
- VERSION=$(python -c "from searxqt.version import __version__; print(__version__)")
- fi
- ./utils/gen_deb.sh
- if [[ $? -ne 0 ]]; then
- echo "Failed to create package."
- exit 1
- fi
- sudo dpkg -i "./deb_dist/python3-searx-qt_$VERSION-1_all.deb"
- if [[ $? -ne 0 ]]; then
- echo "Failed to install package."
- exit 1
- fi
- rm -rf "$TMP_PATH"
- echo "Searx-Qt $VERSION installed succesfully!"
|