#!/bin/bash
# Copia arquivos em um diretorio e comprime em um pacote ZIP

VERSAO=$1
NOME='abcAJUDA-'$VERSAO

rm -f $NOME.'zip' # CUIDADO!
rm -rf $NOME      # CUIDADO PARA NO SOBRESCREVER UMA VERSO ANTIGA!

zip -9 $NOME'.zip' \
	DISTRO \
	historico \
	abcAJUDA.c \
	abcajuda.exe \
	abch \
	arq/abcAJUDA.txt \
	arq/abc.txt \
	arq/ps.txt \
	arq/abcm2ps/syms.txt \
	arq/abcm2ps/caracter.txt \
	arq/abcm2ps/formato.txt \
	arq/abcm2ps/LEIAME.txt \
	arq/abcm2ps/INSTALA.txt \
	arq/abcm2ps/opcoes.txt \
	DOCUMENTA \
	gera_ajuda.c \
	In.abc \
	LEIAME.txt \
	Licenca.txt \
	License \
	Manual.txt \
	obtem_operadores.c \
	syms.descricao \
	formato.descricao \
	format.descricao \
	abcm2ps-docs/caracter.txt \
	abcm2ps-docs/formato.txt \
	abcm2ps-docs/LEIAME.txt \
	abcm2ps-docs/INSTALA.txt \
	abcm2ps-docs/opcoes.txt \
	abcm2ps-html/caracter.html \
	abcm2ps-html/formato.html \
	abcm2ps-html/LEIAME.html \
	abcm2ps-html/INSTALA.html \
	abcm2ps-html/opcoes.html \
	abcm2ps-html/operadores_postscript_abcm2ps.html \
	operadores_postscript_abcm2ps.html

mkdir $NOME
cd $NOME
unzip -o ../$NOME'.zip' # sobrescreve se necessario
cd ..
rm -f $NOME'.zip'
zip -9r $NOME'.zip' $NOME


