#!/bin/bash

#  Authors     [Robert Meolic (meolic@uni-mb.si)]
#  Revision    [$Revision: 51 $]
#  Date        [$Date: 2013-04-03 17:57:12 +0200 (sre, 03 apr 2013) $]
#
#  Copyright   [This file is part of Biddy.
#               Copyright (C) 2006, 2013 UM-FERI
#               UM-FERI, Smetanova ulica 17, SI-2000 Maribor, Slovenia
#
#               Biddy is free software; you can redistribute it and/or modify
#               it under the terms of the GNU General Public License as
#               published by the Free Software Foundation; either version 2
#               of the License, or (at your option) any later version.
#
#               Biddy is distributed in the hope that it will be useful,
#               but WITHOUT ANY WARRANTY; without even the implied warranty of
#               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#               GNU General Public License for more details.
#
#               You should have received a copy of the GNU General Public
#               License along with this program; if not, write to the Free
#               Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#               Boston, MA 02110-1301 USA.]

VERSION=`sed "s|\.|-|g" VERSION`

rm -f "biddy-source-$VERSION.zip"

cd ..
zip -o "biddy/biddy-source-$VERSION.zip" biddy/* -x .svn -x biddy/libbiddy*/ -x biddy/libbiddy* -x bddscout/bin/ -x bddscout/distribution/ -x biddy/*.zip -x biddy/*.exe
zip -o "biddy/biddy-source-$VERSION.zip" biddy/debian/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" biddy/debian/*/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" biddy/rpm/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" biddy/rpm/*/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/* -x .svn -x bddscout/bin/ -x bddscout/distribution/ -x bddscout/*.zip -x bddscout/*.exe
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/debian/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/debian/*/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/rpm/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/rpm/*/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/IFIP/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddscout/IFIP/*/* -x .svn
zip -o "biddy/biddy-source-$VERSION.zip" bddview/* -x .svn -x bddview/*.zip
cd biddy

echo ""
echo "*******************"
echo "PACKAGES COMPLETED!"
echo "*******************"
echo ""
