mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 09:03:51 -05:00
updated dos->unix convertion script
This commit is contained in:
parent
b6b04dcd67
commit
e872727868
1 changed files with 11 additions and 6 deletions
|
|
@ -2,11 +2,16 @@
|
||||||
|
|
||||||
# This script search for files with [dos] line endings down the current directory and converts them to unix format
|
# This script search for files with [dos] line endings down the current directory and converts them to unix format
|
||||||
|
|
||||||
files=""
|
if test "$*" = ""; then
|
||||||
files=$files" "`find . -name "*.cpp" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
echo No files supplied. Searching for files down the current directory...
|
||||||
files=$files" "`find . -name "*.h" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
files=""
|
||||||
files=$files" "`find . -name "*.ui" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
files=$files" "`find . -name "*.cpp" | xargs file /tmp | grep CRLF | cut -d: -f1`
|
||||||
files=$files" "`find . -name "*.pro" | 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`
|
||||||
|
else
|
||||||
|
files="$*"
|
||||||
|
fi
|
||||||
|
|
||||||
echo About to convert the following files to unix format:
|
echo About to convert the following files to unix format:
|
||||||
for i in $files; do
|
for i in $files; do
|
||||||
|
|
@ -17,7 +22,7 @@ echo Please press [ENTER] when ready
|
||||||
read tmp
|
read tmp
|
||||||
|
|
||||||
for i in $files; do
|
for i in $files; do
|
||||||
echo converting $i...
|
echo " "converting $i...
|
||||||
cat $i | sed -e s/
//g > $i.tmp0000
|
cat $i | sed -e s/
//g > $i.tmp0000
|
||||||
mv -f $i.tmp0000 $i
|
mv -f $i.tmp0000 $i
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue