From 99f3682799f9d693ba0010a3fc41d1abd4e76b83 Mon Sep 17 00:00:00 2001 From: reo Date: Thu, 5 Sep 2024 11:48:58 +0300 Subject: [PATCH] Take a safer approach for symlinking script --- symlinks.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symlinks.sh b/symlinks.sh index 27c4584..bf22f8a 100755 --- a/symlinks.sh +++ b/symlinks.sh @@ -16,7 +16,8 @@ for DIR in "${!DIRS[@]}"; do TARGET="${DIRS[$DIR]}" if [ -e "$TARGET" ]; then - rm -rf "$TARGET" + echo "Warning: $TARGET already exists, skipping..." + continue fi ln -sf "$DOTFILES_DIR/$DIR" "$TARGET"