Add P2_BASE_DIR and small fixes
diff --git a/infoCenter/createInfoCenter.sh b/infoCenter/createInfoCenter.sh
index 2b16e9f..a6e90f7 100755
--- a/infoCenter/createInfoCenter.sh
+++ b/infoCenter/createInfoCenter.sh
@@ -17,7 +17,8 @@
#HELP_HOME=/home/data/httpd/help.eclipse.org/
HELP_HOME=.
WORKDIR=$HELP_HOME/$RELEASE_NAME
-DOWNLOADDIR=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4
+PLATFORM_DIR=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4
+P2_BASE_DIR=/home/data/httpd/download.eclipse.org
SCRIPT_NAME="$(basename ${0})"
BANNER_FILE=org.foundation.helpbanner2_2.0.0.jar
PORT=8086
@@ -26,7 +27,7 @@
printf "Usage %s [releaseName] [pathToArchive] [p2RepoDir] [legacyMode]\n" "${SCRIPT_NAME}"
printf "\t%-16s the release name (e.g. neon, neon1, oxygen, oxygen1)\n" "releaseName"
printf "\t%-16s the path to eclipse-platform archive (e.g. M-4.6.2RC3-201611241400/eclipse-platform-4.6.2RC3-linux-gtk-x86_64.tar.gz)\n" "pathToArchive"
- printf "\t%-16s the path to the P2 repo (e.g. /home/data/httpd/download.eclipse.org/releases/neon/201610111000) (optional)\n" "p2RepoDir"
+ printf "\t%-16s the path to the P2 repo (e.g. releases/neon/201610111000) (optional)\n" "p2RepoDir"
printf "\t%-16s set to 'true' to use legacy mode (default is 'false') (optional)\n" "legacyMode"
}
@@ -46,16 +47,14 @@
prepare() {
# Create new sub directory for info center
echo "Create sub directory for new info center..."
- if [ ! -d "$WORKDIR" ]; then
- mkdir -p $WORKDIR
- fi
- # TODO: exit when sub directory already exists?
+ mkdir -p $WORKDIR
+ # TODO: exit when sub directory already exists?
# Copy/download eclipse-platform
echo "Downloading eclipse-platform..."
if [ ! -f $WORKDIR/eclipse-platform*.tar.gz ]; then
- cp $DOWNLOADDIR/$ZIP_PATH .
+ cp $PLATFORM_DIR/$ZIP_PATH .
fi
# Extract eclipse-platform
@@ -92,9 +91,9 @@
echo "Executing get_jars.sh (LEGACY MODE)... "
./get_jars.sh $WORKDIR/eclipse/dropins/plugins
else
- echo "Executing find_jars.sh (P2_REPO_DIR: $P2_REPO_DIR)..."
+ echo "Executing find_jars.sh (P2_REPO_DIR: $P2_BASE_DIR/$P2_REPO_DIR)..."
filename=doc_plugin_list.txt
- ./find_jars.sh $P2_REPO_DIR
+ ./find_jars.sh $P2_BASE_DIR/$P2_REPO_DIR
while read line; do
cp $line $WORKDIR/eclipse/dropins/plugins
done < $filename
@@ -105,7 +104,7 @@
# Create start script
echo "Create start and stop scripts..."
echo "java -Dhelp.lucene.tokenizer=standard -Dorg.eclipse.equinox.http.jetty.context.sessioninactiveinterval=60 -classpath eclipse/plugins/org.eclipse.help.base_$HELP_BASE_VERSION.jar org.eclipse.help.standalone.Infocenter -clean -command start -eclipsehome eclipse -port $PORT -nl en -locales en -plugincustomization eclipse/plugin_customization.ini -vmargs -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError &" > $WORKDIR/startInfoCenter.sh
- echo "echo \"The Eclipse info center is now started and can be accessed here: http://localhost:$PORT/help/index.jsp\"" >> $WORKDIR/startInfoCenter.sh
+ echo "echo \"The Eclipse info center is now started and can be accessed here: http://localhost:$PORT/help/index.jsp\"" >> $WORKDIR/startInfoCenter.sh
# Create stop script
echo "java -classpath eclipse/plugins/org.eclipse.help.base_$HELP_BASE_VERSION.jar org.eclipse.help.standalone.Infocenter -clean -command shutdown -eclipsehome eclipse -port $PORT 2>&1" > $WORKDIR/stopInfoCenter.sh