Skip to content

Commit 26786d1

Browse files
committed
phpcbf
1 parent 3b99e53 commit 26786d1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/dos2unix.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#
3+
# This file is part of the Zemit Framework.
4+
#
5+
# (c) Zemit Team <[email protected]>
6+
#
7+
# For the full copyright and license information, please view the LICENSE.txt
8+
# file that was distributed with this source code.
9+
#
10+
BASE_DIR="${1:-./}"
11+
find "$BASE_DIR" -type f -name "*.php" | while read -r file; do
12+
if file "$file" | grep -q "CRLF"; then
13+
echo "Converting $file to Unix line endings..."
14+
dos2unix "$file"
15+
fi
16+
done

0 commit comments

Comments
 (0)