From 60069363fea44a0341fdf88f5a0c989e4bfc7f51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:42:15 +0000 Subject: [PATCH 1/2] Initial plan From 7e5c3d7a6625a2c3d0f2ac487eb24e42c2d1e427 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:44:31 +0000 Subject: [PATCH 2/2] Fix snap refresh flag, printf format strings, and update ~/.profile in README Co-authored-by: andreak3779 <11012375+andreak3779@users.noreply.github.com> --- README.md | 10 +++++----- checkforupdates.sh | 4 ++-- showhardware.sh | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 430ff5b..bb68af3 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,10 @@ sudo checkforupdates.sh 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)** @@ -181,9 +181,9 @@ If symlinked to `/usr/local/bin/`: sudo rm /usr/local/bin/showhardware /usr/local/bin/checkforupdates ``` -Remove from PATH (if using ~/.bashrc or ~/.bash_profile): +Remove from PATH (if using ~/.bashrc or ~/.profile): ```bash -# Edit ~/.bashrc or ~/.bash_profile and remove the PATH line +# Edit ~/.bashrc or ~/.profile and remove the PATH line sudo vi ~/.bashrc # Find and delete: export PATH=~/scripts:$PATH ``` diff --git a/checkforupdates.sh b/checkforupdates.sh index 210b2e7..fcdb1d1 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 || echo "Snap refresh encountered an error, continuing..." 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 || echo "Flatpak upgrade encountered an error, continuing..." 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