X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=build%2Farch%2Fwin32%2Funix2dos.sh;fp=build%2Farch%2Fwin32%2Funix2dos.sh;h=c3ee7a8d336f5ef54c3a721c3fdb26198f8bf6a1;hp=0000000000000000000000000000000000000000;hb=6c9943707d4f33035830eba0587a61a34eaecbc2;hpb=af88821a172c4dfd138b91b2a5148ae50b502fa2 diff --git a/build/arch/win32/unix2dos.sh b/build/arch/win32/unix2dos.sh new file mode 100755 index 0000000..c3ee7a8 --- /dev/null +++ b/build/arch/win32/unix2dos.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# +# Yoink +# An implementation of unix2dos using sed. +# + +if [ -f "$1" ]; +then + TMPFILE="$1.$$" + sed 's/\r*$/\r/' "$1" >$TMPFILE + if [ ! "$2" ]; + then + mv -f "$TMPFILE" "$1" + else + mv -f "$TMPFILE" "$2" + fi + rm -f "$TMPFILE" +else + echo "`basename $0` infile [outfile]" + echo " convert a file from unix to dos file format" + exit 1 +fi +