random scripts I use
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
313 B

#!/usr/bin/env fish
function crtolf -d 'Converts all CR=EOL files to LF=EOL'
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"
## EOF