[openrtm-commit:01019] r435 - in branches/RELENG_1_1/rtmtools: . sitetool/jp.go.aist.rtm.rtcbuilder.feature sitetool/jp.go.aist.rtm.rtcbuilder.nl1.feature sitetool/jp.go.aist.rtm.rtsystemeditor.feature sitetool/jp.go.aist.rtm.rtsystemeditor.nl1.feature
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 2月 20日 (水) 21:45:54 JST
Author: n-ando
Date: 2013-02-20 21:45:54 +0900 (Wed, 20 Feb 2013)
New Revision: 435
Added:
branches/RELENG_1_1/rtmtools/check_packages
Modified:
branches/RELENG_1_1/rtmtools/
branches/RELENG_1_1/rtmtools/make_packages
branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.feature/feature.xml
branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.nl1.feature/feature.xml
branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.feature/feature.xml
branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.nl1.feature/feature.xml
Log:
Merged r433-434
Property changes on: branches/RELENG_1_1/rtmtools
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/rtmtools:166-393,395-396,398,400,402,404,406-407,409-411,413-417,419,421-428
+ /trunk/rtmtools:166-393,395-396,398,400,402,404,406-407,409-411,413-417,419,421-428,433-434
Copied: branches/RELENG_1_1/rtmtools/check_packages (from rev 434, trunk/rtmtools/check_packages)
===================================================================
--- branches/RELENG_1_1/rtmtools/check_packages (rev 0)
+++ branches/RELENG_1_1/rtmtools/check_packages 2013-02-20 12:45:54 UTC (rev 435)
@@ -0,0 +1,249 @@
+#!/bin/bash
+#
+# @file check_package
+# @brief check script for OpenRTP eclipse packages
+# @author Noriaki Ando <n-ando at aist.go.jp>
+#
+#------------------------------
+#
+#
+
+true ${WORK_DIR:=work_$$}
+# target projects
+PROJECTS="jp.go.aist.rtm.toolscommon.profiles
+ jp.go.aist.rtm.toolscommon.profiles.nl1
+ jp.go.aist.rtm.toolscommon
+ jp.go.aist.rtm.toolscommon.nl1
+ jp.go.aist.rtm.rtcbuilder
+ jp.go.aist.rtm.rtcbuilder.nl1
+ jp.go.aist.rtm.rtcbuilder.java
+ jp.go.aist.rtm.rtcbuilder.python
+ jp.go.aist.rtm.repositoryView
+ jp.go.aist.rtm.repositoryView.nl1
+ jp.go.aist.rtm.nameserviceview
+ jp.go.aist.rtm.nameserviceview.nl1
+ jp.go.aist.rtm.systemeditor
+ jp.go.aist.rtm.systemeditor.nl1"
+
+#------------------------------------------------------------
+# get_version
+#
+# This function gets version number and project version string
+# from version text file.
+# ------------------------------------------------------------
+get_version()
+{
+ if test "x$VERSION" = "x" || test "x$PROJECT_VERSION" = "x" ; then
+ echo "Environment variable VERSION/PROJECT_VERSION is not set."
+ echo "Getting from ./version text."
+ if test ! -f version.txt ; then
+ echo "version.txt not found. Plugins should be built at first."
+ echo "Aborting."
+ exit 1
+ fi
+ . ./version.txt
+ fi
+ export VERSION
+ export PROJECT_VERSION
+
+ if test "x$DISTDIR" = "x" ; then
+ DISTDIR=openrtp-$VERSION
+ fi
+ if test "x$JARDIR" = "x" ; then
+ JARDIR=$JARDIR_DEFAULT
+ fi
+}
+
+
+#------------------------------------------------------------
+# check_archive
+#------------------------------------------------------------
+check_archive()
+{
+ rm -rf $WORK_DIR/eclipse
+ mkdir -p $WORK_DIR
+ zip=`echo $FILE_NAME | grep '[zZ][iI][pP]'`
+ tar=`echo $FILE_NAME | grep '[tT][aA][rR].[gG][zZ]'`
+ if test ! "x$zip" = "x" ; then
+ echo "Extracting zip file: $FILE_NAME ..."
+ unzip $FILE_NAME -d $WORK_DIR >/dev/null 2>&1 && return 0
+ echo "Failed to extract zip file: $FILE_NAME. Aborting..."
+ return 1
+ elif test ! "x$tar" = "x" ; then
+ echo "Extracting tar.gz file: $FILE_NAME ..."
+ tar xvzf $FILE_NAME -C $WORK_DIR >/dev/null 2>&1 && return 0
+ echo "Failed to extract tar.gz file: $FILE_NAME. Aborting..."
+ return 1
+ else
+ echo "Unknown file extention. Aborting..."
+ return 1
+ fi
+ return 1
+}
+
+check_dependent_plugins()
+{
+ plugins="org.eclipse.emf_*.jar
+org.eclipse.gef_*.jar
+org.eclipse.xsd_*.jar
+org.eclipse.emf.ecore.xcore_*.jar"
+ for p in $plugins ; do
+ tmp=`ls $WORK_DIR/eclipse/plugins/$p`
+ if test "x$tmp" = "x" ; then
+ echo "[ERROR] Plugin: $p does not exist. Aboring."
+ return 1
+ else
+ file_name=`basename $tmp`
+ echo "[OK] Plugin: $file_name exists."
+ fi
+ done
+ return 0
+}
+
+check_dependent_features()
+{
+ features="org.eclipse.emf_*
+ org.eclipse.emf.ecore.xcore_*
+ org.eclipse.xsd_*
+ org.eclipse.gef_*"
+ for p in $features ; do
+ tmp=`ls -d $WORK_DIR/eclipse/features/$p`
+ if test "x$tmp" = "x" ; then
+ echo "[ERROR] Feature: $p does not exist. Aboring."
+ return 1
+ else
+ file_name=`basename $tmp`
+ echo "[OK] Feature: $file_name exists."
+ fi
+ done
+ return 0
+}
+
+check_openrtp_plugins()
+{
+ is_ja=`echo $FILE_NAME | grep 'ja'`
+ for p in $PROJECTS ; do
+ jar_name="${p}_${PROJECT_VERSION}.jar"
+ is_nl=`echo $p | grep '.nl'`
+ if test "x$is_nl" != "x" -a "x$is_ja" = "x" ; then
+ continue
+ fi
+ if test ! -f $WORK_DIR/eclipse/plugins/$jar_name ; then
+ echo "[ERROR] Plugin file $jar_name does not exist."
+ return 1
+ else
+ echo "[OK] Plugin: $jar_name exists."
+ fi
+ done
+ return 0
+}
+
+check_openrtp_features()
+{
+ is_ja=`echo $FILE_NAME | grep 'ja'`
+ if test "x$is_ja" = "x" ; then
+ features="jp.go.aist.rtm.rtcbuilder.feature_*
+ jp.go.aist.rtm.rtsystemeditor.feature_*"
+ else
+ features="jp.go.aist.rtm.rtcbuilder.feature_*
+ jp.go.aist.rtm.rtcbuilder.nl1.feature_*
+ jp.go.aist.rtm.rtsystemeditor.feature_*
+ jp.go.aist.rtm.rtsystemeditor.nl1.feature_*"
+ fi
+ for p in $features ; do
+ tmp=`ls -d $WORK_DIR/eclipse/features/$p`
+ if test "x$tmp" = "x" ; then
+ echo "[ERROR] Feature: $p does not exist."
+ return 1
+ else
+ file_name=`basename $tmp`
+ echo "[OK] Feature: $file_name exists."
+ fi
+ done
+ return 0
+}
+
+check_langpack()
+{
+ is_ja=`echo $FILE_NAME | grep 'ja'`
+ if test "x$is_ja" = "x" ; then
+ # this is not Japanese eclipse package
+ return 0
+ fi
+
+ # checking pleiades
+ if test -d $WORK_DIR/eclipse/plugins/jp.sourceforge.mergedoc.pleiades; then
+ echo "[OK] Pleiades installed."
+ return 0
+ fi
+ # checking langpack
+ tmp=`ls $WORK_DIR/eclipse/plugins/*nl_ja*`
+ if test "x$tmp" != "x" ; then
+ echo "[OK] Lang pack installed."
+ return 0
+ fi
+
+ echo "[ERROR] No language package installed."
+ return 1
+}
+
+check_package()
+{
+ FILE_NAME=$1
+ if check_archive && \
+ check_dependent_plugins && \
+ check_dependent_features && \
+ check_openrtp_plugins && \
+ check_openrtp_features && \
+ check_langpack ; then
+ OK_FILES="$OK_FILES $FILE_NAME"
+ else
+ BROKEN_FILES="$BROKEN_FILES $FILE_NAME"
+ fi
+}
+
+check_packages()
+{
+ for f in $* ; do
+ check_package $f
+ done
+
+ echo ""
+ echo "------------------------------------------------------------"
+ echo " Correct Package"
+ echo "------------------------------------------------------------"
+ for f in $OK_FILES ; do
+ echo $f
+ done
+
+ echo ""
+ echo "------------------------------------------------------------"
+ echo " Broken Packages"
+ echo "------------------------------------------------------------"
+ for f in $BROKEN_FILES ; do
+ echo $f
+ done
+
+}
+
+
+#------------------------------
+# main
+#------------------------------
+if test $# -eq 0 ; then
+ echo "Usage: $0 <OpenRTP eclipse packages>"
+ echo ""
+ echo "Example:"
+ echo " $ $0 packages/eclipse381*"
+ echo ""
+ exit 0
+fi
+
+get_version
+check_packages $*
+rm -rf $WORK_DIR
+
+if test "x$BROKEN_FILES" != "x" ; then
+ exit 1
+fi
+exit 0
Modified: branches/RELENG_1_1/rtmtools/make_packages
===================================================================
--- branches/RELENG_1_1/rtmtools/make_packages 2013-02-20 12:42:59 UTC (rev 434)
+++ branches/RELENG_1_1/rtmtools/make_packages 2013-02-20 12:45:54 UTC (rev 435)
@@ -270,12 +270,12 @@
tar=`echo $FILE_NAME | grep '[tT][aA][rR].[gG][zZ]'`
if test ! "x$zip" = "x" ; then
echo "Extracting zip file..."
- unzip $FILE_NAME -d $WORK_DIR && return 0
+ unzip $FILE_NAME -d $WORK_DIR >/dev/null 2>&1 && return 0
echo "Failed to extract zip file: $FILE_NAME. Aborting..."
exit 1
elif test ! "x$tar" = "x" ; then
echo "Extracting tar.gz file..."
- tar xvzf $FILE_NAME -C $WORK_DIR && return 0
+ tar xvzf $FILE_NAME -C $WORK_DIR >/dev/null 2>&1 && return 0
echo "Failed to extract tar.gz file: $FILE_NAME. Aborting..."
exit 1
else
@@ -332,7 +332,7 @@
$cmd $app_opt $dest_opt $repo_opt -installIU $p
if test $? -ne 0 ; then
echo "Plugin: $p installation failed. Aborting."
- return 0
+ return 1
fi
done
@@ -389,7 +389,7 @@
basedir=`pwd`
cd $WORK_DIR
find eclipse > .zip_list
- (cat .zip_list | zip -@ $pkg_name)
+ (cat .zip_list | zip -@ $pkg_name >/dev/null 2>&1 )
rm -f .zip_list
cd $basedir
if test $? -ne 0 ;then
@@ -400,7 +400,7 @@
echo "Creating tar.gz file..."
basedir=`pwd`
cd $WORK_DIR
- tar cvzf $pkg_name eclipse
+ tar cvzf $pkg_name eclipse >/dev/null 2>&1
cd $basedir
if test $? -ne 0 ; then
echo "Failed to archive tar.gz file: $pkg_name. Aborting..."
Modified: branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.feature/feature.xml
===================================================================
--- branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.feature/feature.xml 2013-02-20 12:42:59 UTC (rev 434)
+++ branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.feature/feature.xml 2013-02-20 12:45:54 UTC (rev 435)
@@ -7,11 +7,11 @@
plugin="jp.go.aist.rtm.rtcbuilder">
<url>
- <update label="Open RTP tools update site" url="http://www.openrtm.org/staging/pub/OpenRTP/updates/"/>
+ <update label="OpenRTP tools update site" url="http://openrtm.org/pub/openrtp/releases/updates/"/>
</url>
<requires>
- <import feature="org.eclipse.platform" version="3.4" match="compatible"/>
+ <import feature="org.eclipse.platform" version="3.7" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.compare"/>
Modified: branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.nl1.feature/feature.xml
===================================================================
--- branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.nl1.feature/feature.xml 2013-02-20 12:42:59 UTC (rev 434)
+++ branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtcbuilder.nl1.feature/feature.xml 2013-02-20 12:45:54 UTC (rev 435)
@@ -6,11 +6,11 @@
provider-name="AIST">
<url>
- <update label="Open RTP tools update site" url="http://www.openrtm.org/staging/pub/OpenRTP/updates/"/>
+ <update label="OpenRTP tools update site" url="http://openrtm.org/pub/openrtp/releases/updates/"/>
</url>
<requires>
- <import feature="org.eclipse.platform" version="3.4" match="compatible"/>
+ <import feature="org.eclipse.platform" version="3.7" match="greaterOrEqual"/>
<import feature="jp.go.aist.rtm.rtcbuilder.feature" version="1.1.0"/>
</requires>
Modified: branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.feature/feature.xml
===================================================================
--- branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.feature/feature.xml 2013-02-20 12:42:59 UTC (rev 434)
+++ branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.feature/feature.xml 2013-02-20 12:45:54 UTC (rev 435)
@@ -7,11 +7,11 @@
plugin="jp.go.aist.rtm.systemeditor">
<url>
- <update label="Open RTP tools update site" url="http://www.openrtm.org/staging/pub/OpenRTP/updates/"/>
+ <update label="OpenRTP tools update site" url="http://openrtm.org/pub/openrtp/releases/updates/"/>
</url>
<requires>
- <import feature="org.eclipse.platform" version="3.4" match="compatible"/>
+ <import feature="org.eclipse.platform" version="3.7" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
Modified: branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.nl1.feature/feature.xml
===================================================================
--- branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.nl1.feature/feature.xml 2013-02-20 12:42:59 UTC (rev 434)
+++ branches/RELENG_1_1/rtmtools/sitetool/jp.go.aist.rtm.rtsystemeditor.nl1.feature/feature.xml 2013-02-20 12:45:54 UTC (rev 435)
@@ -6,11 +6,11 @@
provider-name="AIST">
<url>
- <update label="Open RTP tools update site" url="http://www.openrtm.org/staging/pub/OpenRTP/updates/"/>
+ <update label="OpenRTP tools update site" url="http://openrtm.org/pub/openrtp/releases/updates/"/>
</url>
<requires>
- <import feature="org.eclipse.platform" version="3.4" match="compatible"/>
+ <import feature="org.eclipse.platform" version="3.7" match="greaterOrEqual"/>
<import feature="jp.go.aist.rtm.rtsystemeditor.feature" version="1.1.0"/>
</requires>
More information about the openrtm-commit
mailing list