Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 71b38cc2a02bded496d9f66b8f375bb358d09250 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# directory that points to an Eclipse SDK or similar
ECLIPSE_DIR="/opt/eclipse/64/eclipse.rcp.kepler.m7"
#ECLIPSE_DIR="/shared/technology/epp/epp_build/photon/eclipse"

ECLIPSE="${ECLIPSE_DIR}/eclipse"

if [ $# -gt "0" ]
then
  echo "Using list of given URLs."
  until [ -z "$1" ]  # Until all parameters used up . . .
    do
      REPO_URL=${1}
      echo "Using URL ${REPO_URL}"
      shift
      ${ECLIPSE} -noSplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source ${REPO_URL} -destination file:.
      ${ECLIPSE} -noSplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source ${REPO_URL} -destination file:.
    done
else
  echo "Searching for local repositories."
  for II in `ls -tr */content.jar`;
    do
      REPO_URL=${II%/content.jar}
      echo "Using URL ${REPO_URL}"
      ${ECLIPSE} -noSplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source ${REPO_URL} -destination file:.
      ${ECLIPSE} -noSplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source ${REPO_URL} -destination file:.
    done
fi  

Back to the top