Dough Git

commit

Fix ShellCheck warnings, bump actions/checkout to v5

commit
519d7bbba2a83963ba9ac85af707398315448003
author
Clove Twilight <[email protected]>
date
2026-11-08 04:15
- install-deps.sh: drop rustup from the package list with a loop, and
  read MISSING with mapfile, instead of unquoted array splitting
- screenshot: region='' copy='' instead of bare =
- bashrc: remove the unused color_prompt block (oh-my-posh sets the prompt)
- check.yml: actions/checkout@v5, since v4 runs on deprecated Node 20

diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 9363368..b27c976 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -8,7 +8,7 @@ jobs:
   shellcheck:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v5
       - name: ShellCheck the installers and scripts
         run: shellcheck -S warning install install-*.sh binaries/*
       - name: ShellCheck bashrc
@@ -17,7 +17,7 @@ jobs:
   install:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v5
 
       - name: Dry runs (no changes)
         run: |
diff --git a/bashrc b/bashrc
index 8027cac..9cf0801 100644
--- a/bashrc
+++ b/bashrc
@@ -19,29 +19,7 @@ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
     debian_chroot=$(cat /etc/debian_chroot)
 fi
 
-# set a fancy prompt (non-color, unless we know we "want" color)
-case "$TERM" in
-    xterm-color|*-256color) color_prompt=yes;;
-esac
-
-# uncomment for a colored prompt, if the terminal has the capability; turned
-# off by default to not distract the user: the focus in a terminal window
-# should be on the output of commands, not on the prompt
-force_color_prompt=yes
-
-if [ -n "$force_color_prompt" ]; then
-    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
-	# We have color support; assume it's compliant with Ecma-48
-	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
-	# a case would tend to support setf rather than setaf.)
-	color_prompt=yes
-    else
-	color_prompt=
-    fi
-fi
-
 # Prompt is oh-my-posh, configured at the end of this file
-unset color_prompt force_color_prompt
 
 # enable color support of ls and also add handy aliases
 if [ -x /usr/bin/dircolors ]; then
diff --git a/binaries/screenshot b/binaries/screenshot
index ef8222e..609e910 100755
--- a/binaries/screenshot
+++ b/binaries/screenshot
@@ -3,7 +3,7 @@
 #   -s  select a region (default: whole screen)
 #   -c  copy to clipboard instead of saving
 #   -r  start/stop a screen recording (region select)
-region= copy=
+region='' copy=''
 while getopts scr opt; do
   case $opt in
     s) region=1 ;;
diff --git a/install-deps.sh b/install-deps.sh
index fecaef4..8137e60 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -85,7 +85,13 @@ arch)
         grim slurp wf-recorder firefox flatpak xdg-desktop-portal-wlr
         jq curl unzip git fontconfig base-devel rustup)
   # rustup conflicts with the rust package, and --noconfirm would abort the whole install
-  if have cargo && ! have rustup; then PKGS=("${PKGS[@]/rustup}"); PKGS=(${PKGS[@]}); fi ;;
+  if have cargo && ! have rustup; then
+    kept=()
+    for pkg in "${PKGS[@]}"; do
+      [ "$pkg" = rustup ] || kept+=("$pkg")
+    done
+    PKGS=("${kept[@]}")
+  fi ;;
 fedora)
   PKGS=(swayfx waybar swaybg mpvpaper mpv wlsunset swayidle autotiling polkit-gnome gnome-keyring
         mako libnotify fuzzel gtklock ImageMagick kitty yazi
@@ -286,7 +292,7 @@ if [ "$SERVICES" = 1 ]; then
 fi
 
 # ---------- Summary ----------
-MISSING=($(printf '%s\n' "${MISSING[@]}" | grep -v '^$'))
+mapfile -t MISSING < <(printf '%s\n' "${MISSING[@]}" | grep -v '^$')
 step "Done"
 if [ ${#MISSING[@]} -gt 0 ]; then
   warn "Not available from your package manager: ${MISSING[*]}"