add crtolf script

master
an 2019-06-16 22:35:46 -04:00
parent 0eafa3c8b5
commit 0a1e5a4ef2
1 changed files with 14 additions and 0 deletions

14
scripts/crtolf.fish Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env fish
for f in (find . -type f)
set ftype (file -b --mime-type "$f")
set basetype (string split "/" "$ftype")
if test "$basetype[1]" = "text"
set tmp (mktemp)
mac2unix -n "$f" "$tmp"
mv "$tmp" "$f"
end
end
## EOF