#!/bin/sh
REPO_DIR=$1
if [ -z "$REPO_DIR" ]; then echo "usage: $0 [repository directory]"; exit; fi
if [ -z "$MAVEN_HOME" ]; then echo "MAVEN_HOME must be set"; exit; fi
if [ ! -f $REPO_DIR/maven/jars/dom4j-1.7-20060614.jar ]; then 
  mkdir -p $REPO_DIR/maven/jars
  cp $MAVEN_HOME/lib/dom4j-1.7-20060614.jar $REPO_DIR/maven/jars
fi
if [ ! -f $REPO_DIR/jaxen/jars/jaxen-1.1-beta-9.jar ]; then 
  mkdir -p $REPO_DIR/jaxen/jars
  cp $MAVEN_HOME/lib/jaxen-1.1-beta-9.jar $REPO_DIR/jaxen/jars
fi
if [ ! -f $REPO_DIR/ant/jars/ant-1.6.5.jar ]; then 
  mkdir -p $REPO_DIR/ant/jars
  cp $MAVEN_HOME/lib/ant-1.6.5.jar $REPO_DIR/ant/jars
fi
if [ ! -f $REPO_DIR/ant/jars/ant-nodeps-1.6.5.jar ]; then 
  mkdir -p $REPO_DIR/ant/jars
  cp $MAVEN_HOME/lib/ant-nodeps-1.6.5.jar $REPO_DIR/ant/jars
fi
if [ ! -f $REPO_DIR/ant/jars/ant-junit-1.6.5.jar ]; then 
  mkdir -p $REPO_DIR/ant/jars
  cp $MAVEN_HOME/lib/ant-junit-1.6.5.jar $REPO_DIR/ant/jars
fi
if [ ! -f $REPO_DIR/ant/jars/ant-launcher-1.6.5.jar ]; then 
  mkdir -p $REPO_DIR/ant/jars
  cp $MAVEN_HOME/lib/ant-launcher-1.6.5.jar $REPO_DIR/ant/jars
fi
if [ ! -f $REPO_DIR/ant/jars/ant-trax-1.6.5.jar ]; then 
  mkdir -p $REPO_DIR/ant/jars
  cp $MAVEN_HOME/lib/ant-trax-1.6.5.jar $REPO_DIR/ant/jars
fi
if [ ! -f $REPO_DIR/maven/jars/commons-jelly-1.0.1-20060717.jar ]; then 
  mkdir -p $REPO_DIR/maven/jars
  cp $MAVEN_HOME/lib/commons-jelly-1.0.1-20060717.jar $REPO_DIR/maven/jars
fi
if [ ! -f $REPO_DIR/commons-jelly/jars/commons-jelly-tags-ant-1.1.jar ]; then 
  mkdir -p $REPO_DIR/commons-jelly/jars
  cp $MAVEN_HOME/lib/commons-jelly-tags-ant-1.1.jar $REPO_DIR/commons-jelly/jars
fi
if [ ! -f $REPO_DIR/commons-jelly/jars/commons-jelly-tags-define-1.0.jar ]; then 
  mkdir -p $REPO_DIR/commons-jelly/jars
  cp $MAVEN_HOME/lib/commons-jelly-tags-define-1.0.jar $REPO_DIR/commons-jelly/jars
fi
if [ ! -f $REPO_DIR/commons-jelly/jars/commons-jelly-tags-util-1.1.1.jar ]; then 
  mkdir -p $REPO_DIR/commons-jelly/jars
  cp $MAVEN_HOME/lib/commons-jelly-tags-util-1.1.1.jar $REPO_DIR/commons-jelly/jars
fi
if [ ! -f $REPO_DIR/commons-jelly/jars/commons-jelly-tags-xml-1.1.jar ]; then 
  mkdir -p $REPO_DIR/commons-jelly/jars
  cp $MAVEN_HOME/lib/commons-jelly-tags-xml-1.1.jar $REPO_DIR/commons-jelly/jars
fi
if [ ! -f $REPO_DIR/commons-jexl/jars/commons-jexl-1.1.jar ]; then 
  mkdir -p $REPO_DIR/commons-jexl/jars
  cp $MAVEN_HOME/lib/commons-jexl-1.1.jar $REPO_DIR/commons-jexl/jars
fi
if [ ! -f $REPO_DIR/commons-logging/jars/commons-logging-1.0.4.jar ]; then 
  mkdir -p $REPO_DIR/commons-logging/jars
  cp $MAVEN_HOME/lib/commons-logging-1.0.4.jar $REPO_DIR/commons-logging/jars
fi
if [ ! -f $REPO_DIR/commons-httpclient/jars/commons-httpclient-3.0.jar ]; then 
  mkdir -p $REPO_DIR/commons-httpclient/jars
  cp $MAVEN_HOME/lib/commons-httpclient-3.0.jar $REPO_DIR/commons-httpclient/jars
fi
if [ ! -f $REPO_DIR/commons-codec/jars/commons-codec-1.2.jar ]; then 
  mkdir -p $REPO_DIR/commons-codec/jars
  cp $MAVEN_HOME/lib/commons-codec-1.2.jar $REPO_DIR/commons-codec/jars
fi
if [ ! -f $REPO_DIR/commons-cli/jars/commons-cli-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/commons-cli/jars
  cp $MAVEN_HOME/lib/commons-cli-1.0-beta-2.jar $REPO_DIR/commons-cli/jars
fi
if [ ! -f $REPO_DIR/commons-io/jars/commons-io-1.2.jar ]; then 
  mkdir -p $REPO_DIR/commons-io/jars
  cp $MAVEN_HOME/lib/commons-io-1.2.jar $REPO_DIR/commons-io/jars
fi
if [ ! -f $REPO_DIR/forehead/jars/forehead-1.0-beta-5.jar ]; then 
  mkdir -p $REPO_DIR/forehead/jars
  cp $MAVEN_HOME/lib/forehead-1.0-beta-5.jar $REPO_DIR/forehead/jars
fi
if [ ! -f $REPO_DIR/log4j/jars/log4j-1.2.13.jar ]; then 
  mkdir -p $REPO_DIR/log4j/jars
  cp $MAVEN_HOME/lib/log4j-1.2.13.jar $REPO_DIR/log4j/jars
fi
if [ ! -f $REPO_DIR/xml-apis/jars/xml-apis-1.3.03.jar ]; then 
  mkdir -p $REPO_DIR/xml-apis/jars
  cp $MAVEN_HOME/lib/endorsed/xml-apis-1.3.03.jar $REPO_DIR/xml-apis/jars
fi
if [ ! -f $REPO_DIR/xml-resolver/jars/xml-resolver-1.1.jar ]; then 
  mkdir -p $REPO_DIR/xml-resolver/jars
  cp $MAVEN_HOME/lib/endorsed/xml-resolver-1.1.jar $REPO_DIR/xml-resolver/jars
fi
if [ ! -f $REPO_DIR/xerces/jars/xercesImpl-2.8.0.jar ]; then 
  mkdir -p $REPO_DIR/xerces/jars
  cp $MAVEN_HOME/lib/endorsed/xercesImpl-2.8.0.jar $REPO_DIR/xerces/jars
fi
if [ ! -f $REPO_DIR/org.codehaus.plexus/jars/plexus-utils-1.0.5.jar ]; then 
  mkdir -p $REPO_DIR/org.codehaus.plexus/jars
  cp $MAVEN_HOME/lib/plexus-utils-1.0.5.jar $REPO_DIR/org.codehaus.plexus/jars
fi
if [ ! -f $REPO_DIR/maven/jars/maven-model-3.0.2.jar ]; then 
  mkdir -p $REPO_DIR/maven/jars
  cp $MAVEN_HOME/lib/maven-model-3.0.2.jar $REPO_DIR/maven/jars
fi
if [ ! -f $REPO_DIR/stax/jars/stax-1.2.0.jar ]; then 
  mkdir -p $REPO_DIR/stax/jars
  cp $MAVEN_HOME/lib/stax-1.2.0.jar $REPO_DIR/stax/jars
fi
if [ ! -f $REPO_DIR/stax/jars/stax-api-1.0.1.jar ]; then 
  mkdir -p $REPO_DIR/stax/jars
  cp $MAVEN_HOME/lib/stax-api-1.0.1.jar $REPO_DIR/stax/jars
fi
if [ ! -f $REPO_DIR/net.java.dev.stax-utils/jars/stax-utils-20060502.jar ]; then 
  mkdir -p $REPO_DIR/net.java.dev.stax-utils/jars
  cp $MAVEN_HOME/lib/stax-utils-20060502.jar $REPO_DIR/net.java.dev.stax-utils/jars
fi
if [ ! -f $REPO_DIR/org.apache.maven.wagon/jars/wagon-provider-api-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/org.apache.maven.wagon/jars
  cp $MAVEN_HOME/lib/wagon-provider-api-1.0-beta-2.jar $REPO_DIR/org.apache.maven.wagon/jars
fi
if [ ! -f $REPO_DIR/org.apache.maven.wagon/jars/wagon-http-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/org.apache.maven.wagon/jars
  cp $MAVEN_HOME/lib/wagon-http-1.0-beta-2.jar $REPO_DIR/org.apache.maven.wagon/jars
fi
if [ ! -f $REPO_DIR/org.apache.maven.wagon/jars/wagon-file-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/org.apache.maven.wagon/jars
  cp $MAVEN_HOME/lib/wagon-file-1.0-beta-2.jar $REPO_DIR/org.apache.maven.wagon/jars
fi
if [ ! -f $REPO_DIR/org.apache.maven.wagon/jars/wagon-ssh-common-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/org.apache.maven.wagon/jars
  cp $MAVEN_HOME/lib/wagon-ssh-common-1.0-beta-2.jar $REPO_DIR/org.apache.maven.wagon/jars
fi
if [ ! -f $REPO_DIR/org.apache.maven.wagon/jars/wagon-ssh-1.0-beta-2.jar ]; then 
  mkdir -p $REPO_DIR/org.apache.maven.wagon/jars
  cp $MAVEN_HOME/lib/wagon-ssh-1.0-beta-2.jar $REPO_DIR/org.apache.maven.wagon/jars
fi
if [ ! -f $REPO_DIR/commons-beanutils/jars/commons-beanutils-1.6.1.jar ]; then 
  mkdir -p $REPO_DIR/commons-beanutils/jars
  cp $MAVEN_HOME/lib/commons-beanutils-1.6.1.jar $REPO_DIR/commons-beanutils/jars
fi
if [ ! -f $REPO_DIR/commons-collections/jars/commons-collections-3.0.jar ]; then 
  mkdir -p $REPO_DIR/commons-collections/jars
  cp $MAVEN_HOME/lib/commons-collections-3.0.jar $REPO_DIR/commons-collections/jars
fi
if [ ! -f $REPO_DIR/commons-lang/jars/commons-lang-2.0.jar ]; then 
  mkdir -p $REPO_DIR/commons-lang/jars
  cp $MAVEN_HOME/lib/commons-lang-2.0.jar $REPO_DIR/commons-lang/jars
fi
if [ ! -f $REPO_DIR/com.jcraft/jars/jsch-0.1.27.jar ]; then 
  mkdir -p $REPO_DIR/com.jcraft/jars
  cp $MAVEN_HOME/lib/jsch-0.1.27.jar $REPO_DIR/com.jcraft/jars
fi
