diff --git a/script/install/install_debian_dependency.sh b/script/install/install_debian_dependency.sh index 562ab43..8df7730 100755 --- a/script/install/install_debian_dependency.sh +++ b/script/install/install_debian_dependency.sh @@ -14,12 +14,18 @@ EL_USER=${USER} UBUNTU_VERSION=$(lsb_release -rs) DEBIAN_VERSION=$(lsb_release -cs) OS=$(lsb_release -si) -if [ "25.10" == "${UBUNTU_VERSION}" ] || [ "25.04" == "${UBUNTU_VERSION}" ] || [ "24.04" == "${UBUNTU_VERSION}" ] || [ "24.10" == "${UBUNTU_VERSION}" ] || [ "23.10" == "${UBUNTU_VERSION}" ] || [ "23.04" == "${UBUNTU_VERSION}" ] || [ "22.10" == "${UBUNTU_VERSION}" ] || [ "22.04" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb -elif [ "20.04" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb -elif [ "18.04" == "${UBUNTU_VERSION}" ]; then - WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb +if [[ "${OS}" == "Ubuntu" ]]; then + if [ "25.10" == "${UBUNTU_VERSION}" ] || [ "25.04" == "${UBUNTU_VERSION}" ] || [ "24.04" == "${UBUNTU_VERSION}" ] || [ "24.10" == "${UBUNTU_VERSION}" ] || [ "23.10" == "${UBUNTU_VERSION}" ] || [ "23.04" == "${UBUNTU_VERSION}" ] || [ "22.10" == "${UBUNTU_VERSION}" ] || [ "22.04" == "${UBUNTU_VERSION}" ]; then + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb + elif [ "20.04" == "${UBUNTU_VERSION}" ]; then + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb + elif [ "18.04" == "${UBUNTU_VERSION}" ]; then + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb + fi +elif [[ "${OS}" == "Linuxmint" ]]; then + if [ "22.3" == "${UBUNTU_VERSION}" ]; then + WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb + fi elif [[ "${OS}" == "Debian" ]]; then if [ "bookworm" == "${DEBIAN_VERSION}" ]; then WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb diff --git a/script/install/install_dev.sh b/script/install/install_dev.sh index 6da22d2..2220a12 100755 --- a/script/install/install_dev.sh +++ b/script/install/install_dev.sh @@ -1,23 +1,30 @@ #!/usr/bin/env bash if [[ "${OSTYPE}" == "linux-gnu" ]]; then - source /etc/os-release - if [[ "${ID}" == "ubuntu" ]]; then - if [[ "${VERSION_ID}" == "18.04" || "${VERSION_ID}" == "20.04" || "${VERSION_ID}" == "22.04" || "${VERSION_ID}" == "22.10" || "${VERSION_ID}" == "23.04" || "${VERSION_ID}" == "23.10" || "${VERSION_ID}" == "24.04" || "${VERSION_ID}" == "25.04" || "${VERSION_ID}" == "25.10" ]]; then - echo "\n---- linux-gnu installation process started ----" - ./script/install/install_debian_dependency.sh - else - echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04, 25.04, 25.10 : ${VERSION_ID}" - fi - elif [[ "${ID}" == "debian" ]]; then - ./script/install/install_debian_dependency.sh - elif [[ "${ID}" == "arch" ]]; then - ./script/install/install_arch_linux.sh + source /etc/os-release + if [[ "${ID}" == "ubuntu" ]]; then + if [[ "${VERSION_ID}" == "18.04" || "${VERSION_ID}" == "20.04" || "${VERSION_ID}" == "22.04" || "${VERSION_ID}" == "22.10" || "${VERSION_ID}" == "23.04" || "${VERSION_ID}" == "23.10" || "${VERSION_ID}" == "24.04" || "${VERSION_ID}" == "25.04" || "${VERSION_ID}" == "25.10" ]]; then + echo "\n---- linux-gnu installation process started ----" + ./script/install/install_debian_dependency.sh else - ./script/install/install_debian_dependency.sh - echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04 - Ubuntu 23.10 - Ubuntu 24.04, Ubuntu 25.04, Ubuntu 25.10 ." + echo "Your version is not supported, only support 18.04, 20.04 and 22.04 - 24.04, 25.04, 25.10 : ${VERSION_ID}" fi + elif [[ "${ID}" == "linuxmint" ]]; then + if [[ "${VERSION_ID}" == "22.3" ]]; then + echo "\n---- linux-gnu installation process started ----" + ./script/install/install_debian_dependency.sh + else + echo "Your version is not supported, only support 22.3 : ${VERSION_ID}" + fi + elif [[ "${ID}" == "debian" ]]; then + ./script/install/install_debian_dependency.sh + elif [[ "${ID}" == "arch" ]]; then + ./script/install/install_arch_linux.sh + else + ./script/install/install_debian_dependency.sh + echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04 - Ubuntu 23.10 - Ubuntu 24.04, Ubuntu 25.04, Ubuntu 25.10 ." + fi elif [[ "${OSTYPE}" == "darwin"* ]]; then - echo "\n---- Darwin installation process started ----" - ./script/install/install_OSX_dependency.sh + echo "\n---- Darwin installation process started ----" + ./script/install/install_OSX_dependency.sh fi