|
Packit Service |
706eca |
@echo off
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
|
Packit Service |
706eca |
Rem format, or else stock DOS/Windows shells will refuse to run it.
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem This batch file unpacks the GDB distribution while simultaneously
|
|
Packit Service |
706eca |
Rem renaming some of the files whose names are invalid on DOS or conflict
|
|
Packit Service |
706eca |
Rem with other file names after truncation to DOS 8+3 namespace.
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem Invoke like this:
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem djunpack gdb-XYZ.tar
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem where XYZ is the version number. If the argument includes leading
|
|
Packit Service |
706eca |
Rem directories, it MUST use backslashes, not forward slashes.
|
|
Packit Service |
706eca |
Rem
|
|
Packit Service |
706eca |
Rem The following 2 lines need to be changed with each new GDB release, to
|
|
Packit Service |
706eca |
Rem be identical to the name of the top-level directory where the GDB
|
|
Packit Service |
706eca |
Rem distribution unpacks itself.
|
|
Packit Service |
706eca |
set GDBVER=$package-8.2
|
|
Packit Service |
706eca |
if "%GDBVER%"=="$package-8.2" GoTo EnvOk
|
|
Packit Service |
706eca |
Rem If their environment space is too small, re-exec with a larger one
|
|
Packit Service |
706eca |
command.com /e:4096 /c %0 %1
|
|
Packit Service |
706eca |
GoTo End
|
|
Packit Service |
706eca |
:EnvOk
|
|
Packit Service |
706eca |
if not exist %1 GoTo NoArchive
|
|
Packit Service |
706eca |
djtar -x -p -o %GDBVER%/gdb/config/djgpp/fnchange.lst %1 > fnchange.tmp
|
|
Packit Service |
706eca |
Rem The following uses a feature of COPY whereby it does not copy
|
|
Packit Service |
706eca |
Rem empty files. We need that because the previous line will create
|
|
Packit Service |
706eca |
Rem an empty fnchange.tmp even if the command failed for some reason.
|
|
Packit Service |
706eca |
copy fnchange.tmp junk.tmp > nul
|
|
Packit Service |
706eca |
if not exist junk.tmp GoTo NoDjTar
|
|
Packit Service |
706eca |
del junk.tmp
|
|
Packit Service |
706eca |
sed -e "s,@V@,%GDBVER%,g" < fnchange.tmp > fnchange.lst
|
|
Packit Service |
706eca |
Rem See the comment above about the reason for using COPY.
|
|
Packit Service |
706eca |
copy fnchange.lst junk.tmp > nul
|
|
Packit Service |
706eca |
if not exist junk.tmp GoTo NoSed
|
|
Packit Service |
706eca |
del junk.tmp
|
|
Packit Service |
706eca |
djtar -x -n fnchange.lst %1
|
|
Packit Service |
706eca |
GoTo End
|
|
Packit Service |
706eca |
:NoSed
|
|
Packit Service |
706eca |
echo FAIL: Sed is not available.
|
|
Packit Service |
706eca |
GoTo End
|
|
Packit Service |
706eca |
:NoDjTar
|
|
Packit Service |
706eca |
echo FAIL: DJTAR is not available or no fnchange.lst file in %1.
|
|
Packit Service |
706eca |
GoTo End
|
|
Packit Service |
706eca |
:NoArchive
|
|
Packit Service |
706eca |
echo FAIL: the file %1 does not seem to exist.
|
|
Packit Service |
706eca |
echo Remember that %1 cannot use forward slashes, only backslashes.
|
|
Packit Service |
706eca |
GoTo End
|
|
Packit Service |
706eca |
:End
|
|
Packit Service |
706eca |
set GDBVER=
|