2009-09-08 17:40:51 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2009-11-11 19:06:58 +01:00
|
|
|
CODEHOME=~/code/pandora/trunk
|
2010-09-22 20:31:25 +02:00
|
|
|
CODEHOME_ENT=~/code/artica
|
2009-12-08 20:05:35 +01:00
|
|
|
RPMHOME=/usr/src/packages
|
2010-05-21 13:58:30 +02:00
|
|
|
VERSION=$(grep 'my $pandora_version =' $CODEHOME/pandora_server/lib/PandoraFMS/Config.pm | awk '{print substr($4, 2, length($4) - 3)}')
|
|
|
|
KEYGEN_VERSION=$(grep "%define version" $CODEHOME_ENT/updatemanager/keygen/pandora/pandora_keygen.spec | awk '{print $3}')
|
2009-09-08 17:40:51 +02:00
|
|
|
|
|
|
|
echo "Creating source tarballs (/usr/src/rpm/SOURCES)"
|
2010-09-22 20:31:25 +02:00
|
|
|
sudo rm -Rf /usr/src/rpm/SOURCES/pandorafms_*.tar.gz
|
2009-09-08 17:40:51 +02:00
|
|
|
|
2009-09-21 02:37:07 +02:00
|
|
|
cd $CODEHOME/pandora_agents
|
2009-11-11 19:06:58 +01:00
|
|
|
sudo tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz --exclude \.svn --exclude nohup linux
|
|
|
|
sudo tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$VERSION.tar.gz --exclude \.svn --exclude nohup unix
|
|
|
|
|
2009-09-08 17:40:51 +02:00
|
|
|
cd $CODEHOME
|
2009-11-11 19:06:58 +01:00
|
|
|
sudo tar zcvf $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz --exclude \.svn pandora_server
|
2009-09-08 17:40:51 +02:00
|
|
|
|
|
|
|
# Console OpenSource
|
|
|
|
cd $CODEHOME
|
2010-09-22 20:31:25 +02:00
|
|
|
sudo tar zcvf $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz --exclude \.svn --exclude config.php --exclude enterprise pandora_console
|
2010-05-20 15:42:47 +02:00
|
|
|
|
2009-09-08 17:40:51 +02:00
|
|
|
# Console Enterprise
|
|
|
|
cd $CODEHOME_ENT/pandora/trunk/pandora_console
|
2009-11-11 19:06:58 +01:00
|
|
|
sudo tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz --exclude \.svn enterprise/*
|
2010-05-20 15:42:47 +02:00
|
|
|
|
2009-09-08 17:40:51 +02:00
|
|
|
# Server OpenSource
|
|
|
|
cd $CODEHOME_ENT/pandora/trunk/pandora_server/
|
2009-11-11 19:06:58 +01:00
|
|
|
sudo tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz --exclude \.svn PandoraFMS-Enterprise
|
2010-05-20 15:42:47 +02:00
|
|
|
|
2009-09-08 17:40:51 +02:00
|
|
|
# Updatemanager Client keygen
|
|
|
|
cd $CODEHOME_ENT/updatemanager/keygen
|
2010-05-21 13:58:30 +02:00
|
|
|
sudo tar cvzf $RPMHOME/SOURCES/pandorafms_keygen-$KEYGEN_VERSION.tar.gz --exclude .svn --exclude keygen --exclude keygen.i386.static --exclude pandora_keygen.spec pandora
|
2009-09-08 17:40:51 +02:00
|
|
|
|