Fixing scripts.
This commit is contained in:
@@ -6,17 +6,17 @@
|
||||
[ -x /usr/bin/ccmtcnvt ] || exit 0
|
||||
|
||||
directory=${1-`pwd`}
|
||||
for filename in $( find $directory -name '*.c' )
|
||||
for filename in $( find ${directory} -name '*.c' )
|
||||
do
|
||||
echo Converting $filename
|
||||
/usr/bin/ccmtcnvt $filename > /tmp/ccmtcnvt.karg
|
||||
mv /tmp/ccmtcnvt.karg $filename
|
||||
echo Converting ${filename}
|
||||
/usr/bin/ccmtcnvt ${filename} > /tmp/ccmtcnvt.karg
|
||||
mv /tmp/ccmtcnvt.karg ${filename}
|
||||
done
|
||||
|
||||
for filename in $( find $directory -name '*.h' )
|
||||
for filename in $( find ${directory} -name '*.h' )
|
||||
do
|
||||
echo Converting $filename
|
||||
/usr/bin/ccmtcnvt $filename > /tmp/ccmtcnvt.karg
|
||||
mv /tmp/ccmtcnvt.karg $filename
|
||||
echo Converting ${filename}
|
||||
/usr/bin/ccmtcnvt ${filename} > /tmp/ccmtcnvt.karg
|
||||
mv /tmp/ccmtcnvt.karg ${filename}
|
||||
done
|
||||
|
||||
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# fix DOS/Unix names, and remove backup files
|
||||
|
||||
# exit silently if utility is not installed
|
||||
[ -x /usr/bin/dos2unix ] || exit 0
|
||||
|
||||
directory=${1-`pwd`}
|
||||
for filename in $( find ${directory} -name '*.c' )
|
||||
do
|
||||
echo Fixing DOS/Unix ${filename}
|
||||
/usr/bin/dos2unix ${filename}
|
||||
done
|
||||
|
||||
for filename in $( find ${directory} -name '*.h' )
|
||||
do
|
||||
echo Fixing DOS/Unix ${filename}
|
||||
/usr/bin/dos2unix ${filename}
|
||||
done
|
||||
|
||||
for filename in $( find ${directory} -name '*~' )
|
||||
do
|
||||
echo Removing backup ${filename}
|
||||
rm ${filename}
|
||||
done
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# indent uses a local indent.pro file if it exists
|
||||
|
||||
# File must be in consistent unix format before indenting
|
||||
# exit silently if utility is not installed
|
||||
[ -x /usr/bin/indent ] || exit 0
|
||||
[ -x /usr/bin/dos2unix ] || exit 0
|
||||
|
||||
Reference in New Issue
Block a user