mirror of https://github.com/apache/maven.git
Adding ability to work from $PATH, and ability to default over to unzip if jar xf doesn't work.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@395920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1435cfd61
commit
1c8c736a69
|
@ -7,7 +7,16 @@ VERSION=$3
|
||||||
[ "${BUNDLEURL}" = "" ] && echo && echo "You must specify a bundle URL!" && echo && exit
|
[ "${BUNDLEURL}" = "" ] && echo && echo "You must specify a bundle URL!" && echo && exit
|
||||||
|
|
||||||
WORKDIR=bundle.tmp
|
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
|
# repo dir relative to WORKDIR
|
||||||
REPODIR=$HOME/repository-staging/to-ibiblio/maven
|
REPODIR=$HOME/repository-staging/to-ibiblio/maven
|
||||||
|
|
||||||
|
@ -17,6 +26,7 @@ mkdir $WORKDIR
|
||||||
|
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
|
|
||||||
|
echo "Retrieving URL: '${BUNDLEURL}'"
|
||||||
wget $BUNDLEURL
|
wget $BUNDLEURL
|
||||||
BUNDLE=`echo $BUNDLEURL | sed -e 's#^.*/##;'`
|
BUNDLE=`echo $BUNDLEURL | sed -e 's#^.*/##;'`
|
||||||
|
|
||||||
|
@ -26,25 +36,34 @@ BUNDLE=tmp.jar
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
||||||
jar xf $BUNDLE
|
echo "Unzipping original bundle."
|
||||||
|
jar xf $BUNDLE || unzip $BUNDLE
|
||||||
|
|
||||||
# copy files in subdirs to workdir
|
# copy files in subdirs to workdir
|
||||||
|
echo "Copying files to working directory."
|
||||||
for d in `find ./* -type d` ; do
|
for d in `find ./* -type d` ; do
|
||||||
for f in `find $d -type f` ; do cp $f .; done;
|
for f in `find $d -type f` ; do cp $f .; done;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Searching for POM:"
|
||||||
|
echo "...checking for 'project.xml'"
|
||||||
POM=project.xml
|
POM=project.xml
|
||||||
if [ ! -f ${POM} ]
|
if [ ! -f ${POM} ]
|
||||||
then
|
then
|
||||||
|
echo "...checking for 'pom.xml'"
|
||||||
POM=pom.xml
|
POM=pom.xml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${POM} ]
|
if [ ! -f ${POM} ]
|
||||||
then
|
then
|
||||||
|
echo "...searching for **/*.pom"
|
||||||
POM=`find . -iname *.pom`
|
POM=`find . -iname *.pom`
|
||||||
fi
|
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
|
[ ! -f ${POM} ] && echo && echo "Cannot deploy without the pom.xml or project.xml file!" && echo && exit
|
||||||
|
|
||||||
|
echo "POM is: '${POM}'"
|
||||||
less $POM
|
less $POM
|
||||||
|
|
||||||
$SCRIPTDIR/d2u ${POM}
|
$SCRIPTDIR/d2u ${POM}
|
||||||
|
|
Loading…
Reference in New Issue