Files
modstagram-back/scripts/fix-crlf.sh
2026-07-04 19:24:56 +03:30

9 lines
382 B
Bash

#!/bin/bash
# Fix Windows line endings (CRLF -> LF) after FTP upload
# Run once: bash fix-crlf.sh
DIR="$(cd "$(dirname "$0")" && pwd)"
find "$DIR" -type f \( -name "*.sh" -o -name "*.conf" -o -name "db.*" -o -name "*.snippet" \) -exec sed -i 's/\r$//' {} \;
chmod +x "$DIR/server-setup.sh" "$DIR/cdn-ssl.sh" "$DIR/fix-crlf.sh" 2>/dev/null || true
echo "Fixed line endings in $DIR"