Skip to main content
summaryrefslogtreecommitdiffstats
blob: 5a911a698aa99288d6890652a86ed55977b7f5b5 (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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#*******************************************************************************
# Copyright (c) 2009 Tasktop Technologies and others.
# 
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
# 
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#      Tasktop Technologies - initial API and implementation
#*******************************************************************************
#!/bin/bash -e

if [ $# -lt 1 ]; then
 ROOT=$PWD
else
 ROOT=$1
fi
if [ $# -lt 2 ]; then
 NAME="Mylyn for Eclipse 3.8, 4.3, and 4.4"
else
 NAME="$2"
fi

if [ -z "$JAVA_HOME" ]; then
 echo "JAVA_HOME is not set"
 exit 1
fi
if [ -z "$ECLIPSE_HOME" ]; then
 echo "ECLIPSE_HOME is not set"
 exit 1
fi

pack() {
DIR=$1
SITEXML=$DIR/category.xml
if [ ! -e $SITEXML ]; then
 SITEXML=$DIR/site.xml
fi
if [ ! -e $SITEXML ]; then
 echo "$SITEXML not found"
 exit 1
fi

echo Processing $DIR using $SITEXML

rm -f $DIR/artifacts.jar $DIR/content.jar $DIR/digest.zip

#$JAVA_HOME/bin/java \
# -Xmx512m \
# -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar \
# -application org.eclipse.update.core.siteOptimizer \
# -verbose -processAll \
# -digestBuilder -digestOutputDir=$DIR -siteXML=$DIR/site.xml || true
 
$JAVA_HOME/bin/java \
 -Xmx512m \
 -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar \
 -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
 -source $DIR \
 -metadataRepository file:$DIR \
 -metadataRepositoryName "$2 "\
 -artifactRepository file:$DIR \
 -artifactRepositoryName "$2" \
 -compress \
 -reusePack200Files \
 -publishArtifacts

$JAVA_HOME/bin/java \
 -Xmx512m \
 -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar \
 -application org.eclipse.equinox.p2.publisher.CategoryPublisher \
 -metadataRepository file:$DIR \
 -categoryDefinition file:$SITEXML \
 -compress \
 -categoryQualifier

chmod 664 $DIR/artifacts.jar $DIR/content.jar #$DIR/digest.zip
}

pack "$ROOT" "$NAME"

Back to the top