.key FILE,DIRECTORY,FILE2,FILE3,FILE4,FILE5,FILE6,FILE7,FILE8,FILE9,FILEA,FILEB
.bra {
.ket }
; $VER: TGZ 1.0 (13.01.97) - Tar Archiver and GZip Script in one command
; (C) 1997 by Finn Jacobs. Feel free to copy. Don't try to manipulate this
;   b'coz' if you program something in this script it would causes bugs forever !

echo ""
echo "TGZ 1.0 (13.01.97) written by Finn Jacobs <stu33234@mail.uni-kiel.de>."
IF NOT {FILE}
  echo "Usage: *e[1mTGZ <archivefile> <directory> [<file1>,<file2>,<file3>,...]*e[0m"
  echo ""
  echo "	Examples:"
  echo "		*e[1mtgz test ram:*e[0m"
  echo "		(creates an archive 'test.tgz' with contents of RAM:)"
  echo ""
  echo "		*e[1mtgz test C:List C:Copy Devs:System-Configuration*e[0m"
  echo "		(creates an archive 'test.tgz' with the files C:List, C:Copy"
  echo "		 and Devs:System-Configuration)"
  echo ""
  echo " If exists an archive with the name test.tgz and you don't want to delete it"
  echo " by pressing <n>o then an archive name 'test.tar.gz' will be created."
  echo ""
ELSE

TAR -cf {FILE}.TAR {DIRECTORY} {FILE2} {FILE3} {FILE4} {FILE5} {FILE6} {FILE7} {FILE8} {FILE9} {FILEA} {FILEB}
gzip {FILE}.TAR
IF EXISTS({FILE}.TGZ)
  Ask "Ein Archiv mit dem Namen {FILE}.TGZ existiert bereits. Ueberschreiben (y/n) ?"
  IF WARN
    Delete >nil: {FILE}.TGZ
    rename >nil: {FILE}.TAR.GZ {FILE}.TGZ
    echo "{FILE}.TGZ wurde erstellt !"
  ELSE
    echo "{FILE}.TAR.GZ wurde erstellt !"
  ENDIF
ELSE
  Echo "{FILE}.TAR.GZ wurde erstellt !"
ENDIF
ENDIF
; TAR	-	TAR Archiver (UNiX)
; GZIP	-	GZIP Compression Tool 1.2.4 (UNiX)
; UnTGZ -	UnTGZ Extract-Tool 1.3 (UNiX-Like)
; 	-	All Software is free and in the archive included.
