-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_artifacts.sh
executable file
·62 lines (57 loc) · 2.75 KB
/
generate_artifacts.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Copied from http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_publisher.html
#
# Features And Bundles Publisher
#
# The features and bundles publisher application (org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher)
# is a command line application that is capable of generating metadata (p2 repositories) from pre-built Eclipse
# bundles and features. The features and bundle publisher can be invoked using the generic Eclipse launcher format as follows:
#
# eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher <publisherArgs>
#
# Here are command-line options:
#
# -metadataRepository <URI>
# the URI to the metadata repository where the installable units should be published
# -artifactRepository <URI>
# the URI to the artifact repository where the artifacts should be published
# -source <path>
# the location of the update site
# -bundles <path>
# the location of the bundles
# -features <path>
# the location of the features
# -compress
# a flag indicating that the repository should be compressed
# -append
# flag indicating that repositories will be appended to as opposed to over-written
# -publishArtifacts
# flag indicating that the artifacts should be published (copied) to the repository. When this flag is not set,
# the actual bytes underlying the artifact will not be copied, but the repository index will be created.
# When this option is not specified, it is recommended to set the artifactRepository to be in the same location as the source (-source).
#
# The features and bundles publisher application can be invoked using the -source option by pointing at a directory that contains
# two sub-directories (features and plug-ins). The publisher can also be invoked by pointing at the bundles and features separately and using the -bundles and -features options.
#
# Here is an example of how the features and bundles publisher can be used to create a compressed p2 repository from a collection of bundles and features:
#
# eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher
# -metadataRepository file:/<some location>/repository
# -artifactRepository file:/<some location>/repository
# -source /<location with a plugin and feature directory>
# -configs gtk.linux.x86
# -compress
# -publishArtifacts
#
#
DIRNAME=`dirname "$0"`
cd $DIRNAME
REPNAME="$PWD/repository"
rm -f $REPNAME/artifacts.* $REPNAME/content.*
java -jar $HOME/Applications/eclipse-3.7-rcp/plugins/org.eclipse.equinox.launcher_*.jar \
-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
-metadataRepository file:/$REPNAME \
-artifactRepository file:/$REPNAME \
-source $REPNAME \
-configs gtk.linux.x86 \
-compress