scripts/scripts/cmds/crtolf

16 lines
263 B
Fish
Executable File

#!/usr/bin/env fish
# vim: syntax=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