Take a safer approach for symlinking script

This commit is contained in:
reo 2024-09-05 11:48:58 +03:00
parent 93b3891051
commit 99f3682799

View file

@ -16,7 +16,8 @@ for DIR in "${!DIRS[@]}"; do
TARGET="${DIRS[$DIR]}" TARGET="${DIRS[$DIR]}"
if [ -e "$TARGET" ]; then if [ -e "$TARGET" ]; then
rm -rf "$TARGET" echo "Warning: $TARGET already exists, skipping..."
continue
fi fi
ln -sf "$DOTFILES_DIR/$DIR" "$TARGET" ln -sf "$DOTFILES_DIR/$DIR" "$TARGET"