maven/sandbox/repoclean/install.sh
John Dennis Casey a436d8a8b6 o Adding new repository cleanup tool which does:
- artifact-to-POM correlation
 - artifact-to-MD5 correlation and synchronization
 - v3-to-v4 POM syntax conversion
 - v4 model validation (minimum required)
 - v4 model patching from POM path in repo (reconstructs some missing info from loss of <extends/>).

o This application has been tested and should be ready to run. Will try to arrange test with a copy of the ibiblio-v1 repo on beaver.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163602 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 22:56:42 +00:00

57 lines
1.8 KiB
Bash

#!/bin/sh
echo ""
echo "*******************"
echo "* NOTE: Usage for this script is: 'sh ./install.sh /path/to/install/target /path/to/local/repo'"
echo "*******************"
echo ""
(
# First, ensure that the repoclean library has been built.
echo "-----------------------------------------------------------------------"
echo " Building a clean copy of repoclean ... "
echo "-----------------------------------------------------------------------"
m2 clean:clean package
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
(
# Now, install the bash script and dependencies to the specified target dir.
echo ""
echo "-----------------------------------------------------------------------"
echo " Installing repoclean to ${1} ... "
echo "-----------------------------------------------------------------------"
echo ""
mkdir -p $1/lib && \
echo "Copying application libraries..."
echo ""
cp target/repoclean-1.0-SNAPSHOT.jar $1/lib && \
cp $2/plexus/jars/plexus-container-default-1.0-alpha-2-SNAPSHOT.jar $1/lib && \
cp $2/plexus/jars/plexus-utils-1.0-alpha-2-SNAPSHOT.jar $1/lib && \
cp $2/classworlds/jars/classworlds-1.1-alpha-1.jar $1/lib && \
echo "Copying startup script, and changing its permissions to '+x'..."
echo ""
cp src/main/bash/repoclean.sh $1 && \
chmod +x $1/repoclean.sh
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
echo ""
echo "*******************"
echo "* repoclean utility has been installed to: ${1}."
echo "*"
echo "* To run, change to '${1}' and execute './repoclean.sh', which will give further usage instructions."
echo "*******************"
echo ""