0

I had to clone an iOS project from github in my Windows. Then when I copied that project into my Mac using a pen drive, the project is no more buildable and many files showing ^M characters in lines end due to difference of End of Line Character formats in different platform.

So what is the proper way to make this project buildable on my Mac?

aschipfl
  • 33,626
  • 12
  • 54
  • 99
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256

1 Answers1

1

You can use dos2unix:

$ brew install dos2unix
$ dos2unix *.swift

Without dos2unix:

for file in *.swift; do tr -d '\r' < $file > temp && mv temp $file; done
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
Yonat
  • 4,382
  • 2
  • 28
  • 37