Improve scripts for non-cygwin user

This commit is contained in:
RobinFleige
2018-08-21 07:56:37 +02:00
parent 76696ce281
commit 6084df47a6
2 changed files with 24 additions and 6 deletions
@@ -2,8 +2,14 @@
# 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="http://p2.sapsailing.com/p2/sailing/"
local_repo="file://`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/ | sed -e 's/\/cygdrive\/\(.\)/\/\1:/'`"
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
local_repo="file://`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/`"
if [ "$OSTYPE" == "cygwin" ]; then
localRepo="file:`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/ | sed 's/^\/cygdrive\/\(.\)/\/\1:/'`"
fi
if [ "$OSTYPE" == "msys" ]; then
localRepo="file:`readlink -f ../../com.sap.sailing.targetplatform.base/target/repository/ | sed 's/^\(\/[[:alpha:]]\)\//\1:\//'`"
fi
# 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