Linux HOWTOs

About | Home | Search

HOWTO: tofrodos
Description: Conversion utility that converts DOS/Win CR/LF to/from Unix LF
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# Tofrodos 1.7.8
# ==============
test -f installed/tofrodos-1.7.8.tar.gz &&
 mv installed/tofrodos-1.7.8.tar.gz .
test ! -f tofrodos-1.7.8.tar.gz &&
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "tofrodos-*" -exec rm -r {} \;
test -d ./tofrodos && rm -r ./tofrodos
tar xzvf ~/tofrodos-1.7.8.tar.gz
mv tofrodos tofrodos-1.7.8
cd tofrodos-1.7.8
test $UID = 0 && chown -R root:root .
cd src

# Install it as root
su -c "make BINDIR=/usr/local/bin MANDIR=/usr/local/man/man1 install"

mkdir -p -m 0700 installed
rm -f installed/tofrodos-*.tar.*
mv tofrodos-1.7.8.tar.gz installed/

# If you ever want to uninstall Tofrodos, this should do it:
( cd /usr/local/bin ; rm -f fromdos todos )
( cd /usr/local/man/man1 ; rm -f fromdos.1 todos.1 )
find ~/src -maxdepth 1 -type d -name "tofrodos-*" -exec rm -r {} \;
rm -f ~/installed/tofrodos-*.tar.*

Back to the list

Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>