From d1b762c645d16132f7cb4acb2da4efc1ed43cc20 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:27:37 +0000 Subject: [PATCH 1/2] Initial plan From b40aedb170db296221a6ba84fe26d06758386076 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:30:46 +0000 Subject: [PATCH 2/2] Fix snap refresh flag, printf format strings, and README profile option Co-authored-by: andreak3779 <11012375+andreak3779@users.noreply.github.com> --- README.md | 6 +++--- checkforupdates.sh | 4 ++-- showhardware.sh | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8714f3b..dc7a276 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,10 @@ sudo checkforupdates source ~/.bashrc ``` - **Option B: Bash Profile (for ~/.bash_profile)** + **Option B: Profile (for ~/.profile)** ```bash - echo 'export PATH=~/scripts:$PATH' >> ~/.bash_profile - source ~/.bash_profile + echo 'export PATH=~/scripts:$PATH' >> ~/.profile + source ~/.profile ``` **Option C: System-wide (requires sudo)** diff --git a/checkforupdates.sh b/checkforupdates.sh index 210b2e7..e1c0ce3 100644 --- a/checkforupdates.sh +++ b/checkforupdates.sh @@ -22,7 +22,7 @@ apt autoremove --yes # Check for Snap if command -v snap &> /dev/null; then echo "Refreshing Snap packages..." - snap refresh --stable + snap refresh || true else echo "Snap is not installed." fi @@ -30,7 +30,7 @@ fi # Check for Flatpak if command -v flatpak &> /dev/null; then echo "Refreshing Flatpak packages..." - flatpak upgrade --assumeyes + flatpak upgrade --assumeyes || true else echo "Flatpak is not installed." fi diff --git a/showhardware.sh b/showhardware.sh index aae7999..88cac6d 100644 --- a/showhardware.sh +++ b/showhardware.sh @@ -11,23 +11,23 @@ fi HEADER="\n====================" FOOTER="====================\n" -printf "$HEADER System Information $FOOTER" +printf "%b" "$HEADER System Information $FOOTER" uname -a -printf "$HEADER Hardware Details $FOOTER" +printf "%b" "$HEADER Hardware Details $FOOTER" lshw -businfo -printf "$HEADER BIOS and System Enclosure Information $FOOTER" +printf "%b" "$HEADER BIOS and System Enclosure Information $FOOTER" dmidecode --type 0,1,3 -printf "$HEADER CPU Information $FOOTER" +printf "%b" "$HEADER CPU Information $FOOTER" lscpu -printf "$HEADER Memory Information $FOOTER" +printf "%b" "$HEADER Memory Information $FOOTER" free -h -printf "$HEADER Disk Usage $FOOTER" +printf "%b" "$HEADER Disk Usage $FOOTER" df -h / -printf "$HEADER Network Interfaces $FOOTER" +printf "%b" "$HEADER Network Interfaces $FOOTER" ip -br addr