Added a new script that eases the uploading process

This commit is contained in:
Simon Pamies
2013-01-10 14:14:20 +01:00
parent 95441b36aa
commit ad2ad27f78
@@ -0,0 +1,28 @@
#!/bin/bash
# Uploads repository to centralized location
# Make sure to have called ./createLocalBaseP2RepositoryLinux.sh before
# and make sure to have activated local-p2-admin target to check
# if everything went well
set -u
USER="trac"
SERVER="sapsailing.com"
REPO_HOME="/home/trac/p2-repositories"
DATE=`date +%s`
echo "Performing backup of old repository to $REPO_HOME/sailing.backup.$DATE..."
ssh $USER@$SERVER "cp -r $REPO_HOME/sailing $REPO_HOME/sailing.backup.$DATE"
echo "Removing old p2-repository"
ssh $USER@$SERVER "rm -rf $REPO_HOME/sailing"
echo "Uploading local repository to $REPO_HOME/sailing"
scp -r ../../com.sap.sailing.targetplatform.base/gen/p2 $USER@$SERVER:$REPO_HOME/sailing
echo "Remote files now available:"
ssh $USER@$SERVER "ls -lah $REPO_HOME/sailing"
echo ""
echo "Make SURE to notify developers that they need to update their target platform!!!"