Skip to content

Commit

Permalink
Merge pull request #101 from Utappia/develop
Browse files Browse the repository at this point in the history
v24.11.24
  • Loading branch information
cerebrux authored Nov 23, 2024
2 parents 1ca6ec0 + d02c3ca commit dd0e257
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
39 changes: 25 additions & 14 deletions assets/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -23,17 +34,7 @@ else
echo ""

echo "Adding Utappia repository"
if [ "$DIST_ID" = "Debian" ]; then
cat <<EOT > "$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 ""
Expand All @@ -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 <<EOT > "$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
14 changes: 7 additions & 7 deletions ucaresystem-core
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit dd0e257

Please sign in to comment.