root / tags / leocad-0-74 / fixwin.sh

Revision 70, 381 bytes (checked in by leo, 9 years ago)

Linux script to remove M from the files and renaming them to lowercase

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2# script to rename all files to lowercase and remove ^M from them
3
4for j in linux common ; do
5for i in $j/*.cpp $j/*.c $j/*.h $j/*.mk ; do
6  if [ -f $i ]; then
7  echo $i | awk \
8  '{
9    if (tolower($1) != $1)
10    {
11        system ("mv "$1" "$1".lower")
12        system ("mv "$1".lower "tolower($1))
13        print $i
14    }
15    }'
16  grep -ls
17 $i | perl -pi -e 's/
18$//g'
19  fi
20done
21done
Note: See TracBrowser for help on using the browser.