From 7ee7fa2843de45f3dac920f4975628ee23077c88 Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 18:08:03 -0400 Subject: [PATCH 1/6] Update install.sh Adds cases for EndeavourOS and LinuxMint --- src/scripts/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index 4f3b687..a985885 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -22,12 +22,12 @@ fi OS=$(echo $OS | tr '[:upper:]' '[:lower:]') case $OS in - "arch"|"archlinux") + "arch"|"archlinux"|"endeavouros") # Arch Linux commands echo "Detected Arch Linux" sudo pacman -S python-virtualenv git ;; - "ubuntu") + "ubuntu"|"linuxmint") # Ubuntu commands echo "Detected Ubuntu" sudo apt-get update From 2d6a0978397b1dd7c5c5699b21808708ae8f460f Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 18:11:38 -0400 Subject: [PATCH 2/6] Update install.sh --- src/scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index a985885..cd2ceb9 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -21,6 +21,7 @@ fi # Convert to lowercase OS=$(echo $OS | tr '[:upper:]' '[:lower:]') +echo $OS case $OS in "arch"|"archlinux"|"endeavouros") # Arch Linux commands From 7e43471133bc9189d098d4edb3a158070cfcfd49 Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 20:04:48 -0400 Subject: [PATCH 3/6] Alternate method for install.sh Rearranges the part that checks for OS id so that it will continue to do that for Termux and Mac, but will check package manager on Linux since that is more cross-compatible. --- src/scripts/install.sh | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index cd2ceb9..ae2234b 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -1,7 +1,8 @@ #!/bin/bash # Automatic compile script -# Detect distribution +# If not on a Linux distro, the OS name is used to ensure compatibility + if [ -f /etc/os-release ]; then . /etc/os-release OS=$ID @@ -21,19 +22,7 @@ fi # Convert to lowercase OS=$(echo $OS | tr '[:upper:]' '[:lower:]') -echo $OS case $OS in - "arch"|"archlinux"|"endeavouros") - # Arch Linux commands - echo "Detected Arch Linux" - sudo pacman -S python-virtualenv git - ;; - "ubuntu"|"linuxmint") - # Ubuntu commands - echo "Detected Ubuntu" - sudo apt-get update - sudo apt-get install build-essential cmake python3-dev libssl-dev qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5svg5-dev qt5-default git wget python3-venv -y - ;; "termux") # Termux commands echo "Detected Termux" @@ -41,16 +30,6 @@ case $OS in apt-get full-upgrade -y apt-get install python3 python-pip git wget ldd binutils ;; - "fedora") - # Fedora commands - echo "Detected Fedora" - sudo dnf install -y git python3-virtualenv qt5-devel - ;; - "opensuse"|"suse") - # OpenSUSE commands - echo "Detected OpenSUSE" - sudo zypper install -y git python3-virtualenv libqt5-qtbase-devel - ;; "darwin") # macOS commands echo "Detected macOS" @@ -62,10 +41,31 @@ case $OS in fi brew install python3 git ;; - *) - echo "Unsupported distribution: $OS" - exit 1 - ;; + +# For most Linux Distros +# Detect Package Manager +if command -v pacman ; then +# Arch Linux commands + echo "Detected Arch Linux" + sudo pacman -S python-virtualenv git + ;; +elif command -v apt ; then +# Ubuntu commands + echo "Detected Ubuntu/Debian" + sudo apt-get update + sudo apt-get install build-essential cmake python3-dev libssl-dev qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5svg5-dev qt5-default git wget python3-venv -y + ;; +elif command -v dnf ; then +# Fedora commands + echo "Detected Fedora" + sudo dnf install -y git python3-virtualenv qt5-devel + ;; +elif command -v zypper ; then +# OpenSUSE commands + echo "Detected OpenSUSE" + sudo zypper install -y git python3-virtualenv libqt5-qtbase-devel + ;; + esac # Common commands From fb46f298690ba6d344b1a9beec9410bbaf655737 Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 20:13:28 -0400 Subject: [PATCH 4/6] Update install.sh --- src/scripts/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index ae2234b..822503f 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -44,23 +44,23 @@ case $OS in # For most Linux Distros # Detect Package Manager -if command -v pacman ; then +if $(command -v pacman) ; then # Arch Linux commands echo "Detected Arch Linux" sudo pacman -S python-virtualenv git ;; -elif command -v apt ; then +elif $(command -v apt) ; then # Ubuntu commands echo "Detected Ubuntu/Debian" sudo apt-get update sudo apt-get install build-essential cmake python3-dev libssl-dev qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5svg5-dev qt5-default git wget python3-venv -y ;; -elif command -v dnf ; then +elif $(command -v dnf) ; then # Fedora commands echo "Detected Fedora" sudo dnf install -y git python3-virtualenv qt5-devel ;; -elif command -v zypper ; then +elif $(command -v zypper) ; then # OpenSUSE commands echo "Detected OpenSUSE" sudo zypper install -y git python3-virtualenv libqt5-qtbase-devel From a9c6d492533f626f24a40d364c3f595e5c8c6a16 Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 20:19:18 -0400 Subject: [PATCH 5/6] Update install.sh --- src/scripts/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index 822503f..0924ab2 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -44,23 +44,23 @@ case $OS in # For most Linux Distros # Detect Package Manager -if $(command -v pacman) ; then +if [command -v pacman ]; then # Arch Linux commands echo "Detected Arch Linux" sudo pacman -S python-virtualenv git ;; -elif $(command -v apt) ; then +elif [ command -v apt ]; then # Ubuntu commands echo "Detected Ubuntu/Debian" sudo apt-get update sudo apt-get install build-essential cmake python3-dev libssl-dev qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5svg5-dev qt5-default git wget python3-venv -y ;; -elif $(command -v dnf) ; then +elif [ command -v dnf ]; then # Fedora commands echo "Detected Fedora" sudo dnf install -y git python3-virtualenv qt5-devel ;; -elif $(command -v zypper) ; then +elif [ command -v zypper ]; then # OpenSUSE commands echo "Detected OpenSUSE" sudo zypper install -y git python3-virtualenv libqt5-qtbase-devel From f7749885bdb033b1ba00c2fdc08ea957d5ef7673 Mon Sep 17 00:00:00 2001 From: omar-st Date: Sun, 28 Jul 2024 20:37:56 -0400 Subject: [PATCH 6/6] Update install.sh Builds successfully in VM. Testing EndeavourOS (check), Arch, Ubuntu, and Mint. --- src/scripts/install.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/scripts/install.sh b/src/scripts/install.sh index 0924ab2..f691f4d 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -41,32 +41,29 @@ case $OS in fi brew install python3 git ;; + esac # For most Linux Distros # Detect Package Manager -if [command -v pacman ]; then +if command -v pacman ; then # Arch Linux commands echo "Detected Arch Linux" sudo pacman -S python-virtualenv git - ;; -elif [ command -v apt ]; then +elif command -v apt ; then # Ubuntu commands echo "Detected Ubuntu/Debian" sudo apt-get update sudo apt-get install build-essential cmake python3-dev libssl-dev qtbase5-dev qtdeclarative5-dev qttools5-dev libqt5svg5-dev qt5-default git wget python3-venv -y - ;; -elif [ command -v dnf ]; then +elif command -v dnf ; then # Fedora commands echo "Detected Fedora" sudo dnf install -y git python3-virtualenv qt5-devel - ;; -elif [ command -v zypper ]; then +elif command -v zypper ; then # OpenSUSE commands echo "Detected OpenSUSE" sudo zypper install -y git python3-virtualenv libqt5-qtbase-devel - ;; +fi -esac # Common commands git clone https://github.com/EchterAlsFake/Porn_Fetch