2005-03-17 17:56:42 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2005-03-31 19:32:07 -05:00
|
|
|
if [ $# -eq 0 ]; then
|
2005-03-22 23:53:30 -05:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "*******************"
|
|
|
|
echo "* Usage: 'sh ./install.sh /path/to/install/target /path/to/local/repo'"
|
|
|
|
echo "*******************"
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|
2005-03-17 17:56:42 -05:00
|
|
|
|
|
|
|
(
|
|
|
|
# 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 ""
|
|
|
|
|
2005-03-22 23:53:30 -05:00
|
|
|
mkdir -p $1/lib
|
2005-03-17 17:56:42 -05:00
|
|
|
|
|
|
|
echo "Copying application libraries..."
|
|
|
|
echo ""
|
|
|
|
|
2005-03-22 23:53:30 -05:00
|
|
|
cp -f target/repoclean-1.0-SNAPSHOT.jar $1/lib
|
2005-04-20 17:51:25 -04:00
|
|
|
|
2005-04-27 00:00:29 -04:00
|
|
|
version=`cat $2/plexus/plexus-container-default/1.0-alpha-3-SNAPSHOT/plexus-container-default-1.0-alpha-3-SNAPSHOT.version.txt`
|
|
|
|
|
|
|
|
cp -f $2/plexus/plexus-container-default/1.0-alpha-3-SNAPSHOT/plexus-container-default-$version.jar $1/lib
|
|
|
|
version="ERROR-IN-SCRIPT"
|
2005-04-20 17:51:25 -04:00
|
|
|
|
|
|
|
version=`cat $2/plexus/plexus-mail-sender-api/1.0-alpha-1-SNAPSHOT/plexus-mail-sender-api-1.0-alpha-1-SNAPSHOT.version.txt`
|
|
|
|
cp -f $2/plexus/plexus-mail-sender-api/1.0-alpha-1-SNAPSHOT/plexus-mail-sender-api-$version.jar $1/lib
|
2005-04-27 00:00:29 -04:00
|
|
|
version="ERROR-IN-SCRIPT"
|
2005-04-20 17:51:25 -04:00
|
|
|
|
|
|
|
version=`cat $2/plexus/plexus-mail-sender-simple/1.0-alpha-1-SNAPSHOT/plexus-mail-sender-simple-1.0-alpha-1-SNAPSHOT.version.txt`
|
|
|
|
cp -f $2/plexus/plexus-mail-sender-simple/1.0-alpha-1-SNAPSHOT/plexus-mail-sender-simple-$version.jar $1/lib
|
2005-04-27 00:00:29 -04:00
|
|
|
version="ERROR-IN-SCRIPT"
|
2005-04-20 17:51:25 -04:00
|
|
|
|
2005-04-06 16:15:07 -04:00
|
|
|
cp -f $2/classworlds/classworlds/1.1-alpha-1/classworlds-1.1-alpha-1.jar $1/lib
|
2005-04-20 17:51:25 -04:00
|
|
|
|
|
|
|
version=`cat $2/org/apache/maven/maven-artifact/2.0-SNAPSHOT/maven-artifact-2.0-SNAPSHOT.version.txt`
|
|
|
|
cp -f $2/org/apache/maven/maven-artifact/2.0-SNAPSHOT/maven-artifact-$version.jar $1/lib
|
2005-04-27 00:00:29 -04:00
|
|
|
version="ERROR-IN-SCRIPT"
|
2005-04-20 17:51:25 -04:00
|
|
|
|
|
|
|
version=`cat $2/org/apache/maven/maven-model/2.0-SNAPSHOT/maven-model-2.0-SNAPSHOT.version.txt`
|
|
|
|
cp -f $2/org/apache/maven/maven-model/2.0-SNAPSHOT/maven-model-$version.jar $1/lib
|
2005-04-27 00:00:29 -04:00
|
|
|
version="ERROR-IN-SCRIPT"
|
2005-04-20 17:51:25 -04:00
|
|
|
|
2005-04-06 16:15:07 -04:00
|
|
|
cp -f $2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-2/wagon-provider-api-1.0-alpha-2.jar $1/lib
|
2005-04-20 17:51:25 -04:00
|
|
|
|
2005-04-06 16:15:07 -04:00
|
|
|
cp -f $2/org/apache/maven/wagon/wagon-file/1.0-alpha-2/wagon-file-1.0-alpha-2.jar $1/lib
|
2005-04-20 17:51:25 -04:00
|
|
|
|
2005-03-17 17:56:42 -05:00
|
|
|
echo "Copying startup script, and changing its permissions to '+x'..."
|
|
|
|
echo ""
|
|
|
|
|
2005-03-22 23:53:30 -05:00
|
|
|
cp -f src/main/bash/repoclean.sh $1
|
2005-03-17 17:56:42 -05:00
|
|
|
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 ""
|