From 76d421de41faf9aeced7beb8c2d54738b05c3fda Mon Sep 17 00:00:00 2001 From: Sakshi Rathi Date: Mon, 17 Aug 2026 17:17:27 +0000 Subject: [PATCH] Update eSim installer for Ubuntu 25.04 --- Ubuntu/install-eSim-scripts/install-eSim-25.04.sh | 8 +++++--- Ubuntu/install-eSim.sh | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Ubuntu/install-eSim-scripts/install-eSim-25.04.sh b/Ubuntu/install-eSim-scripts/install-eSim-25.04.sh index 2af79efc2f..d1756bbdd5 100644 --- a/Ubuntu/install-eSim-scripts/install-eSim-25.04.sh +++ b/Ubuntu/install-eSim-scripts/install-eSim-25.04.sh @@ -111,6 +111,7 @@ function installKicad # Detect Ubuntu version ubuntu_version=$(lsb_release -rs) + # Define KiCad PPAs based on Ubuntu version if [[ "$ubuntu_version" == "24.04" || "$ubuntu_version" == "25.04" ]]; then echo "Ubuntu $ubuntu_version detected." @@ -133,8 +134,7 @@ function installKicad fi else echo "KiCad 8.0 is already installed." - exit 0 - fi + return 0 fi else @@ -151,9 +151,10 @@ function installKicad fi # Install KiCad packages - sudo apt-get install -y --no-install-recommends kicad=8.0.8+dfsg-1 kicad-footprints kicad-libraries kicad-symbols kicad-templates + sudo apt-get install -y --no-install-recommends kicad kicad-footprints kicad-libraries kicad-symbols kicad-templates echo "KiCad installation completed successfully!" + fi } @@ -166,6 +167,7 @@ function installDependency # Update apt repository echo "Updating apt index files..................." sudo apt-get update + set -e # Re-enable exit on error trap error_exit ERR diff --git a/Ubuntu/install-eSim.sh b/Ubuntu/install-eSim.sh index 23072dc3e4..c2d21c1804 100755 --- a/Ubuntu/install-eSim.sh +++ b/Ubuntu/install-eSim.sh @@ -22,8 +22,9 @@ # Function to detect Ubuntu version and full version string get_ubuntu_version() { - VERSION_ID=$(grep "^VERSION_ID" /etc/os-release | cut -d '"' -f 2) - FULL_VERSION=$(lsb_release -d | grep -oP '\d+\.\d+\.\d+') + source /etc/os-release + VERSION_ID="$VERSION_ID" +FULL_VERSION="$VERSION_ID" echo "Detected Ubuntu Version: $FULL_VERSION" } @@ -67,6 +68,7 @@ run_version_script() { echo "VERSION = %(eSim_HOME)s/VERSION" >> $config_dir/$config_file echo "MODELICA_MAP_JSON = %(eSim_HOME)s/library/ngspicetoModelica/Mapping.json" >> $config_dir/$config_file +fi }