#!/bin/sh

USE_TAG=EMAC_R01
PROJECT="emac_top_jb"
DIST_FILE="./files.dist"
DIST_DIR="./release/emac.R01"

# ---------------------------------------------------------------
mkdir -p $DIST_DIR/src
mkdir -p $DIST_DIR/sim
mkdir -p $DIST_DIR/doc


cp ../doc/*.pdf $DIST_DIR/doc/ 2>/dev/null
cp ../doc/*.txt $DIST_DIR/doc/ 2>/dev/null

cp ./dist.in/notes.txt $DIST_DIR/
cp ./dist.in/gpl-3.0.txt $DIST_DIR/
cp ./dist.in/tb_$PROJECT.wdo $DIST_DIR/sim/
cp ./dist.in/tb_$PROJECT.fdo $DIST_DIR/sim/

cp ./dist.in/tb_$PROJECT.vhd $DIST_DIR/src

# Export files tagged for this release
# To avoid problems with renamed files: Don't tag on per file basis. Tag upper directory then delete tag from unwanted files!!!
cvs export -d $DIST_DIR/src/ -r $USE_TAG VHDL/lib/EMAC/src 1>/dev/null
cvs export -d $DIST_DIR/src/ -r $USE_TAG VHDL/lib/FIFO/src 1>/dev/null
cvs export -d $DIST_DIR/src/ -r $USE_TAG VHDL/lib/misc 1>/dev/null
