From eb7a74e6fc75c7310c68aff86c0d50b8eff9537c Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 18 Aug 2025 20:45:10 +0200 Subject: [PATCH] Fix basename error in dotfiles installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Properly handle . and .. in dotfile copy loop - Change directory before listing to avoid path issues - Explicitly exclude . and .. from file copying 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- post-install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/post-install.sh b/post-install.sh index 1b549eb..e74c79d 100755 --- a/post-install.sh +++ b/post-install.sh @@ -92,10 +92,13 @@ echo "[+] Installing dotfiles..." su - ${ALMA_USER} -c ' cd && git clone https://git.dominik-roth.eu/dodox/nullpoint.git /tmp/nullpoint-dotfiles && - for file in /tmp/nullpoint-dotfiles/dotfiles/.*; do - [ -f "$file" ] && cp "$file" . 2>/dev/null || true + cd /tmp/nullpoint-dotfiles/dotfiles && + for file in .*; do + if [ -f "$file" ] && [ "$file" != "." ] && [ "$file" != ".." ]; then + cp "$file" ~/ 2>/dev/null || true + fi done && - rm -rf /tmp/nullpoint-dotfiles + cd && rm -rf /tmp/nullpoint-dotfiles ' || echo "WARNING: dotfiles installation failed" # Set up MOTD