mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-22 07:49:56 -05:00
added script to convert files to unix format
This commit is contained in:
parent
6392d657aa
commit
b6b04dcd67
27
build_scripts/Debian+Ubuntu/convert_dos_files_to_unix.sh
Executable file
27
build_scripts/Debian+Ubuntu/convert_dos_files_to_unix.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script search for files with [dos] line endings down the current directory and converts them to unix format
|
||||
|
||||
files=""
|
||||
files=$files" "`find . -name "*.cpp" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
||||
files=$files" "`find . -name "*.h" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
||||
files=$files" "`find . -name "*.ui" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
||||
files=$files" "`find . -name "*.pro" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
||||
|
||||
echo About to convert the following files to unix format:
|
||||
for i in $files; do
|
||||
echo " "$i
|
||||
done
|
||||
echo Please press [ENTER] when ready
|
||||
|
||||
read tmp
|
||||
|
||||
for i in $files; do
|
||||
echo converting $i...
|
||||
cat $i | sed -e s/
//g > $i.tmp0000
|
||||
mv -f $i.tmp0000 $i
|
||||
done
|
||||
|
||||
echo Done.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user