mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-26 23:46:36 +00:00
update of general installation script
- added check for the right branch / server instance combination - copies also jetty configuration files
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
exec_dir=$PWD
|
||||
cd /home/trac/git
|
||||
active_branch=$(git symbolic-ref -q HEAD)
|
||||
active_branch=`basename $active_branch`
|
||||
echo Active branch is: $active_branch
|
||||
cd $exec_dir
|
||||
server_instance=`basename \`pwd\` | sed -e 's/[12]$//'`
|
||||
echo Active server is: $server_instance
|
||||
if [ $active_branch != $server_instance ]
|
||||
then
|
||||
echo "********** CANCEL INSTALLATION **************************"
|
||||
echo "ACTIVE BRANCH DOES NOT FIT THE CURRENT SERVER INSTANCE!!!"
|
||||
fi
|
||||
|
||||
|
||||
+18
-3
@@ -1,14 +1,29 @@
|
||||
#!/bin/sh
|
||||
branch=`basename \`pwd\` | sed -e 's/[12]$//'`
|
||||
echo Branch: $branch
|
||||
exec_dir=$PWD
|
||||
cd /home/trac/git
|
||||
active_branch=$(git symbolic-ref -q HEAD)
|
||||
active_branch=`basename $active_branch`
|
||||
echo Active branch is: $active_branch
|
||||
cd $exec_dir
|
||||
server_instance=`basename \`pwd\` | sed -e 's/[12]$//'`
|
||||
echo Active server is: $server_instance
|
||||
if [ $active_branch == $server_instance ]
|
||||
then
|
||||
p2PluginRepository=~/git/java/com.sap.sailing.feature.p2build/bin/products/raceanalysis.product.id/linux/gtk/x86_64
|
||||
echo p2 repository for branch: $p2PluginRepository
|
||||
echo p2 repository for branch $active_branch: $p2PluginRepository
|
||||
echo Remove old installation
|
||||
rm -rf plugins/*.*
|
||||
rm -rf org.eclipse.*
|
||||
rm -rf configuration/org.eclipse.*
|
||||
echo Install p2 content
|
||||
cp -v $p2PluginRepository/configuration/config.ini configuration
|
||||
cp -v ~/git/java/target/configuration/jetty/etc/jetty.xml configuration/jetty/etc
|
||||
cp -v ~/git/java/target/configuration/jetty/etc/realm.properties configuration/jetty/etc
|
||||
cp -r -v $p2PluginRepository/configuration/org.eclipse.equinox.simpleconfigurator configuration
|
||||
cp -v $p2PluginRepository/plugins/*.jar plugins
|
||||
echo Done.
|
||||
else
|
||||
echo "********** CANCEL INSTALLATION **************************"
|
||||
echo "ACTIVE BRANCH DOES NOT FIT THE CURRENT SERVER INSTANCE!!!"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user