@echo off
rem $Header: /home/cvs/src/prj/CrCheck/cr2pgp.bat,v 1.11 2025/12/26 14:27:27 ralph Exp $

rem Revision 1.9  2011/02/03 14:09:02  Ralph
rem Revision 1.8  2009/10/23 18:48:25  Ralph
rem CrCheck 4.57 web release (221009)
rem Revision 1.6  2006/04/09 07:47:13  Ralph
rem Revision 1.1  2001/11/26 22:11:28  Administrator
rem Initial import from c:\backup\CrCheck into CVS under c:\src\prj\crcheck
rem Revision 2.2  2001/11/26 21:44:24  Administrator

echo +-------------------------------------------------------------------------+
echo CR2PGP for CrCheck and PGP driver (c) by ROSE SWE, Ralph Roth
echo "DOS/Legacy Version: $Id: cr2pgp.bat,v 1.11 2025/12/26 14:27:27 ralph Exp $"
echo +-------------------------------------------------------------------------+
echo This program is only useful if you have installed PGP Command Line 6.5.x
echo or the good old PGP DOS 2.6.x in your PATH

rem Compress with tpack -m1, rar 25-jan-2000
rem fixes for NT40/move, rar 05-Sept-2000
rem adapted to PGP 6.5.2 cmdline, rar, 13.03.2001
rem crcheck -h + describe/4dos
rem Only CR2PGP.Bat works with long file names....

if exist crcheck.asc del crcheck.asc > nul
if exist crcheck.txt del crcheck.txt > nul
if exist crcheck.txt.asc del crcheck.txt.asc > nul
echo Validating all the files in the current directory (requires DOS 5.0++)

rem THIS version of CR2PGP excludes .PIF files from the CRCHECK.TXT file!

echo Please verify with PGP that this file has a valid signature!>CrCheck.txt
crcheck *.* /h /s>>CrCheck.txt
describe crcheck.txt "Checksum file, run CrCheck to verify"
echo Validating now with PGP (PGP must be in the PATH=... statement)

rem bug reported with -s switch on PGP by cyberrax, 25-jan-2000

pgp -s -ta crcheck.txt
echo Moving and touching (needs MOVE and TOUCH)

if exist crcheck.txt.asc goto newdos

rem some fixes provided by cyberrax

echo CrCheck.txt
if exist crcheck.txt            copy crcheck.asc CrCheck.txt >nul
goto olddos

:newdos
echo CrCheck.txt.asc
if exist crcheck.txt.asc        copy crcheck.txt.asc CrCheck.txt >nul

:olddos
if exist crcheck.asc del crcheck.asc > nul
if exist crcheck.txt.asc del crcheck.txt.asc > nul


rem if you don't have touch (4Dos, Caldera/Dr.DOS, UNIX) remark this line out.

rtouch /T:1:0:0 crcheck.txt

if exist crcheck.txt.asc del crcheck.asc > nul

