diff --git a/README.md b/README.md index 6a2ab76..c6f46ad 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ License: GPL3 (http://www.gnu.org/licenses/gpl.html) Author : Salih Emin Email : salih-(a)-utappia.org - Date : 17-11-2024 (first release 19-02-2009) - Version: 24.11.17 + Date : 24-11-2024 (first release 19-02-2009) + Version: 24.11.24 System : Ubuntu Linux and derivatives. With Deb, Snap or Flatpak. (Partial support for Debian and WSL2) WebSite: http://utappia.org diff --git a/assets/postinst b/assets/postinst index 98cd2df..2f1f118 100755 --- a/assets/postinst +++ b/assets/postinst @@ -4,14 +4,25 @@ # Use of this source code is governed by GPLv3 license that can be # found in the LICENSE file. set -e -DIST_CODENAME=$(lsb_release --codename | cut -f2) -DIST_ID=$(lsb_release --id | cut -f2) + +# Repository configuration COMPATIBLE_DIST_NAME="xenial" KEYSERVER="hkp://keyserver.ubuntu.com" KEY="EBC8F9FD" REPO_URL="http://ppa.launchpad.net/utappia/stable/ubuntu" REPO_FILE="/etc/apt/sources.list.d/utappia.list" +# Distribution detection +if [ -f /etc/os-release ]; then + . /etc/os-release + DIST_ID="$ID" + DIST_FAMILY="$ID_LIKE" +else + DIST_ID=$(lsb_release -si 2>/dev/null || echo "Unknown") + DIST_FAMILY="" +fi + +# Repository existence check echo "Checking if Utappia Repository exists in your system" sleep 2 @@ -23,17 +34,7 @@ else echo "" echo "Adding Utappia repository" - if [ "$DIST_ID" = "Debian" ]; then - cat < "$REPO_FILE" -# Debian compatible Utappia Repository -deb $REPO_URL $COMPATIBLE_DIST_NAME main -deb-src $REPO_URL $COMPATIBLE_DIST_NAME main -EOT - echo "" - echo "Refreshing package list..." - echo "" - apt-get update -o Acquire::ForceIPv4=true - else + if [ "$DIST_ID" = "ubuntu" ] || echo "$DIST_FAMILY" | grep -q "ubuntu"; then echo "Temporarily disabling IPv6" sleep 1 echo "" @@ -52,9 +53,19 @@ EOT sysctl -w net.ipv6.conf.default.disable_ipv6=0 sysctl -w net.ipv6.conf.lo.disable_ipv6=0 + echo "" + echo "Refreshing package list..." + echo "" + apt-get update -o Acquire::ForceIPv4=true + else + cat < "$REPO_FILE" +# Debian compatible Utappia Repository +deb $REPO_URL $COMPATIBLE_DIST_NAME main +deb-src $REPO_URL $COMPATIBLE_DIST_NAME main +EOT echo "" echo "Refreshing package list..." echo "" apt-get update -o Acquire::ForceIPv4=true fi -fi +fi \ No newline at end of file diff --git a/ucaresystem-core b/ucaresystem-core index bf0acdb..054fb0b 100755 --- a/ucaresystem-core +++ b/ucaresystem-core @@ -10,8 +10,8 @@ set -e # Author : Salih Emin # WebSite: http://utappia.org # Email : salih-(at)-utappia.org -# Date : 17-11-2024 (first release 19-02-2009) -# Version: 24.11.17 +# Date : 24-11-2024 (first release 19-02-2009) +# Version: 24.11.24 # System : Ubuntu Linux and derivatives. With Deb, Snap or Flatpak. (Partial support for Debian and WSL2) # Description: #This simple script will automatically refresh your package list, download and install @@ -22,10 +22,10 @@ set -e #Variables DIST_CODENAME=$(lsb_release --codename | cut -f2) -DATE=(date +%F_%T) -UCARE_VERSION=(24.11.17) +DATE=$(date +%F_%T) +UCARE_VERSION="24.11.24" +PREV_VER="24.10" USERNAME=$(logname 2>/dev/null || echo $USER) -PREV_VER=(24.10) # Checking if the user has run the script with "sudo" or not if [[ $EUID -ne 0 ]] ; then clear @@ -264,7 +264,7 @@ function MAINTENANCE { ## Removes package files that can no longer be downloaded and everything except # the lock file in /var/cache/apt/archives, including directories. - sudo apt -y autoclean; sudo apt -y clean; + sudo apt autoclean -y; sudo apt clean -y; echo echo "===== Finished cleaning up downloaded packages =====" sleep 1 @@ -316,7 +316,7 @@ deb http://old-releases.ubuntu.com/ubuntu/ $DIST_CODENAME-security main restrict EOT sudo apt install update-manager-core -sudo apt -y dist-upgrade +sudo apt dist-upgrade -y sudo do-release-upgrade }