You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/04/21 17:52:09 UTC
svn commit: r395920 -
/maven/components/trunk/maven-meeper/src/bin/deploy-bundle
Author: brett
Date: Fri Apr 21 08:52:04 2006
New Revision: 395920
URL: http://svn.apache.org/viewcvs?rev=395920&view=rev
Log:
Adding ability to work from $PATH, and ability to default over to unzip if jar xf doesn't work.
Modified:
maven/components/trunk/maven-meeper/src/bin/deploy-bundle
Modified: maven/components/trunk/maven-meeper/src/bin/deploy-bundle
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-meeper/src/bin/deploy-bundle?rev=395920&r1=395919&r2=395920&view=diff
==============================================================================
--- maven/components/trunk/maven-meeper/src/bin/deploy-bundle (original)
+++ maven/components/trunk/maven-meeper/src/bin/deploy-bundle Fri Apr 21 08:52:04 2006
@@ -7,7 +7,16 @@
[ "${BUNDLEURL}" = "" ] && echo && echo "You must specify a bundle URL!" && echo && exit
WORKDIR=bundle.tmp
-SCRIPTDIR=`dirname $0`
+
+base=`basename $0`
+mylocation=`which $base`
+
+SCRIPTDIR=`dirname $mylocation`
+
+[ -d $SCRIPTDIR ] || SCRIPTDIR=.
+
+echo "Script directory is: ${SCRIPTDIR}"
+
# repo dir relative to WORKDIR
REPODIR=$HOME/repository-staging/to-ibiblio/maven
@@ -17,6 +26,7 @@
cd $WORKDIR
+echo "Retrieving URL: '${BUNDLEURL}'"
wget $BUNDLEURL
BUNDLE=`echo $BUNDLEURL | sed -e 's#^.*/##;'`
@@ -26,25 +36,34 @@
(
- jar xf $BUNDLE
+ echo "Unzipping original bundle."
+ jar xf $BUNDLE || unzip $BUNDLE
# copy files in subdirs to workdir
+ echo "Copying files to working directory."
for d in `find ./* -type d` ; do
for f in `find $d -type f` ; do cp $f .; done;
done
+ echo "Searching for POM:"
+ echo "...checking for 'project.xml'"
POM=project.xml
if [ ! -f ${POM} ]
then
+ echo "...checking for 'pom.xml'"
POM=pom.xml
fi
+
if [ ! -f ${POM} ]
then
+ echo "...searching for **/*.pom"
POM=`find . -iname *.pom`
fi
+ [ "" == "${POM}" ] && echo && echo "Cannot deploy without the pom.xml or project.xml file!" && echo && exit
[ ! -f ${POM} ] && echo && echo "Cannot deploy without the pom.xml or project.xml file!" && echo && exit
+ echo "POM is: '${POM}'"
less $POM
$SCRIPTDIR/d2u ${POM}