You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/05/06 20:56:03 UTC
cvs commit: avalon/merlin/cli/src/bin merlin.sh merlinx merlinx.sh
niclas 2004/05/06 11:56:03
Modified: merlin/cli/src/bin merlin.sh merlinx merlinx.sh
Log:
Added the patch from Cameron Fieber, on a Maven-like search for Maven reopsitories in Merlin development start script. Also deprecated the merlin.sh and merlinx.sh.
Revision Changes Path
1.2 +4 -0 avalon/merlin/cli/src/bin/merlin.sh
Index: merlin.sh
===================================================================
RCS file: /home/cvs/avalon/merlin/cli/src/bin/merlin.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- merlin.sh 18 Apr 2004 12:59:47 -0000 1.1
+++ merlin.sh 6 May 2004 18:56:03 -0000 1.2
@@ -1,6 +1,10 @@
#! /bin/sh
#
+echo "DEPRECATED!!!"
+echo " use 'merlin' instead. This file will disappear in Merlin 4.0"
+echo ""
+
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
case "`uname`" in
1.2 +24 -7 avalon/merlin/cli/src/bin/merlinx
Index: merlinx
===================================================================
RCS file: /home/cvs/avalon/merlin/cli/src/bin/merlinx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- merlinx 18 Apr 2004 12:59:47 -0000 1.1
+++ merlinx 6 May 2004 18:56:03 -0000 1.2
@@ -8,6 +8,16 @@
# respectively.
#
+#usage VARIABLE=`find_maven_repo "property_file" "property_name" "default_value"`
+function find_property()
+{
+ VAL=${3}
+ if [ -f ${1} ] ; then
+ VAL=`cat ${1} | grep ^${2} | cut -d= -f2`
+ fi
+ echo ${VAL}
+}
+
#
# Compute the MERLIN_HOME if not already set.
#
@@ -20,13 +30,20 @@
export MERLIN_HOME="`dirname "$ABSOLUTE_PATH"`"
fi
-# Checking for REPOSITORY
-if [ "$MAVEN_HOME_LOCAL" = "" ] ; then
- REPOSITORY="$HOME/.maven/repository"
-else
- REPOSITORY="$MAVEN_HOME_LOCAL/repository"
-fi
-export MERLIN_ARGS="$MERLIN_ARGS -system \"$REPOSITORY\" -repository \"$REPOSITORY\""
+MAVEN_HOME_LOCAL=${HOME}/.maven
+
+MAVEN_HOME_LOCAL=`find_property "project.properties" "maven.home.local" "${MAVEN_HOME_LOCAL}"`
+MAVEN_HOME_LOCAL=`find_property "build.properties" "maven.home.local" "${MAVEN_HOME_LOCAL}"`
+MAVEN_HOME_LOCAL=`find_property "${HOME}/build.properties" "maven.home.local" "${MAVEN_HOME_LOCAL}"`
+
+MAVEN_REPO_LOCAL=${MAVEN_HOME_LOCAL}/repository
+MAVEN_REPO_LOCAL=`find_property "project.properties" "maven.repo.local" "${MAVEN_REPO_LOCAL}"`
+MAVEN_REPO_LOCAL=`find_property "build.properties" "maven.repo.local" "${MAVEN_REPO_LOCAL}"`
+MAVEN_REPO_LOCAL=`find_property "${HOME}/build.properties" "maven.repo.local" "${MAVEN_REPO_LOCAL}"`
+
+echo "using MAVEN_REPO_LOCAL: ${MAVEN_REPO_LOCAL}"
+
+export MERLIN_ARGS="$MERLIN_ARGS -system \"${MAVEN_REPO_LOCAL}\" -repository \"${MAVEN_REPO_LOCAL}\""
"$MERLIN_HOME/bin/merlin" "$@"
1.2 +4 -0 avalon/merlin/cli/src/bin/merlinx.sh
Index: merlinx.sh
===================================================================
RCS file: /home/cvs/avalon/merlin/cli/src/bin/merlinx.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- merlinx.sh 18 Apr 2004 12:59:47 -0000 1.1
+++ merlinx.sh 6 May 2004 18:56:03 -0000 1.2
@@ -1,6 +1,10 @@
#! /bin/sh
#
+echo "DEPRECATED!!!"
+echo " use 'merlin' instead. This file will disappear in Merlin 4.0"
+echo ""
+
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
case "`uname`" in
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org