Improved scripts

This commit is contained in:
RobinFleige
2018-08-23 15:53:35 +02:00
parent ee6aa97ebe
commit 87a2419f65
3 changed files with 22 additions and 22 deletions
@@ -1,14 +1,10 @@
#!/bin/bash
source ./../../../configuration/correctFilePathInRelationToCurrentOs.sh
# generate a target definition pointing to the locally built p2 repo from the race-analysis-p2-remote target defintion
base="../definitions/race-analysis-p2"
remote_repo="https://p2.sapsailing.com/p2/sailing/"
#reading the filepath and editing it, so it fits for eclipse #currently save works for cygwin, gitbash and linux
if [ "$OSTYPE" == "cygwin" ]; then
local_repo="file:/`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/ | sed -e 's/^\/cygdrive\/\([a-zA-Z]\)\//\1:\//'`"
elif [ "$OSTYPE" == "msys" ]; then
local_repo="file:/`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/ | sed -e 's/^\/\([a-zA-Z]\)\//\1:\//'`"
else
local_repo="file://`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/`"
fi
local_repo=$(correct_file_path "`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/`")
local_repo="file:/$local_repo"
# replace remote p2-repo URL with local repo URL
sed -e "/^<repository location=\"/ s@$remote_repo@$local_repo@" -e 's/target name="Race Analysis Target"/target name="Race Analysis Local Target"/' $base-remote.target > $base-local.target