Re: [AD] DOS vs Unix format

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> However, I notice that fix.sh doesn't ever convert batch files
> to DOS format (while fix.bat does), and neither touches shell
> scripts, so I guess releases don't convert the files in this way
> after all.  IMHO the simplest thing is to fix this, rather than
> make things which are essentially text files appear binary in
> the repository.

A bit late ;-) but I agree.
Afaics, the CVS repository now contains only Unix-encoded text files.

Here are the proposed changes to fix.sh and fix.bat:

--- cvsroot/allegro/fix.bat Sun Feb 17 18:05:22 2002
+++ allegro/fix.bat Sun Feb 17 18:27:08 2002
@@ -85,7 +85,7 @@
 if [%1] == [mingw32] goto done

 echo Converting Allegro files to DOS CR/LF format...
-utod *.bat .../*.c *.cfg .../*.h .../*.inc .../*.rc
+utod .../*.bat .../*.sh .../*.c *.cfg .../*.h .../*.inc .../*.rc
 utod .../*.inl .../*.s .../*.txt .../*._tx makefile.*

 :done
--- cvsroot/allegro/fix.sh Wed Nov 28 14:25:52 2001
+++ allegro/fix.sh Sun Feb 17 18:24:32 2002
@@ -49,6 +49,11 @@
    if [ "$1" != "omit_sh" ]; then
       AL_FILELIST="$AL_FILELIST `find . -type f -name '*.sh'`"
    fi
+
+   # touch DOS batch files?
+   if [ "$1" != "omit_bat" ]; then
+      AL_FILELIST="$AL_FILELIST `find . -type f -name '*.bat'`"
+   fi
 }

 proc_utod()
@@ -67,7 +72,7 @@
 proc_dtou()
 {
    echo "Converting files from DOS/Win32 to Unix..."
-   proc_filelist
+   proc_filelist "omit_bat"
    for file in $AL_FILELIST; do
       echo "$file"
       mv $file _tmpfile


This way, .zip and .tar.gz files for releases will contain DOS-encoded batch
files and Unix-encoded shell scripts (but the DOS users will be able to
convert them to its own encoding format with fix.bat) as usual.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/