Skip to content

Instantly share code, notes, and snippets.

@khotyn
Created May 14, 2012 05:15
Show Gist options
  • Save khotyn/2691895 to your computer and use it in GitHub Desktop.
Save khotyn/2691895 to your computer and use it in GitHub Desktop.
A simple shell script to mirroring a eclipse plugin repository to local.
#!/bin/sh
eclipseHome="/home/khotyn/softwares/eclipse_java/"
pluginName="$1"
updateSiteURL="$2"
localRepositoryHome="/home/khotyn/softwares/eclipse_plugins/"
cd $eclipseHome
./eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source $updateSiteURL -destination "$localRepositoryHome$pluginName"
./eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source $updateSiteURL -destination "$localRepositoryHome$pluginName"
echo "path=$localRepositoryHome$pluginName" > "$localRepositoryHome$pluginName.link"
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment