[openrtm-commit:01083] r2388 - branches/RELENG_1_1/OpenRTM-aist/build
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 5月 10日 (金) 09:25:24 JST
Author: kawauchi
Date: 2013-05-10 09:25:24 +0900 (Fri, 10 May 2013)
New Revision: 2388
Removed:
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_debian.sh
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_fedora.sh
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_ubuntu.sh
Modified:
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_debian.sh
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_fedora.sh
branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_ubuntu.sh
Log:
C++?\231?\148?\168?\228?\184?\128?\230?\139?\172?\227?\130?\164?\227?\131?\179?\227?\130?\185?\227?\131?\136?\227?\131?\188?\227?\131?\171?\227?\130?\185?\227?\130?\175?\227?\131?\170?\227?\131?\151?\227?\131?\136?\228?\191?\174?\230?\173?\163?\227?\128?\130trunk?\227?\129?\174?\229?\134?\133?\229?\174?\185?\227?\129?\168?\229?\144?\136?\227?\130?\143?\227?\129?\155?\227?\130?\139?\227?\128?\130
Deleted: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_debian.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_debian.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_debian.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -1,200 +0,0 @@
-#!/bin/sh
-#
-# @file pkg_install_debian.sh
-# @brief OpenRTM-aist dependent packages install script for Debian-sarge
-# @author Noriaki Ando <n-ando at aist.go.jp>
-# Shinji Kurihara
-# Tetsuo Ando
-# Harumi Miyamoto
-#
-
-#---------------------------------------
-# ããã±ã¼ã¸ãªã¹ã
-#---------------------------------------
-omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver"
-ace="libace libace-dev"
-openrtm="openrtm-aist openrtm-aist-doc openrtm-aist-dev openrtm-aist-example"
-openrtm04="openrtm-aist=0.4.2-1 openrtm-aist-doc=0.4.2-1 openrtm-aist-dev=0.4.2-1 openrtm-aist-example=0.4.2-1"
-pyyaml="python-support python-yaml"
-devel="gcc g++ make uuid-dev"
-packages="$devel $omni $pyyaml $openrtm"
-u_packages="$omni $ace $openrtm "
-
-reposervers="www.openrtm.org www.openrtm.de"
-reposerver=""
-
-#---------------------------------------
-# ãã±ã¼ã«ã®è¨èªç¢ºèª
-#---------------------------------------
-check_lang()
-{
-lang="en"
-
-locale | grep ja_JP > /dev/null && lang="jp"
-
-if test "$lang" = "jp" ;then
- msg1="ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã確èªãã¦ãã ããã\nDebian以å¤ã®OSã®å¯è½æ§ãããã¾ãã"
- msg2="ã³ã¼ããã¼ã ï¼ "
- msg3="ãã®OSã¯ãµãã¼ãããã¦ããã¾ããã"
- msg4=" OpenRTM-aistã®ãªãã¸ããªãç»é²ããã¦ãã¾ããã"
- msg5="Source.listã«OpenrRTM-aistã®ãªãã¸ããªï¼"
- msg6="ã追å ãã¾ããããããã§ããï¼ (y/n) [y] "
- msg7="ä¸æãã¾ãã"
- msg8="ã«ã¼ãã¦ã¼ã¶ã¼ã§å®è¡ãã¦ãã ããã"
- msg9="ã¤ã³ã¹ãã¼ã«ä¸ã§ã..."
- msg10="å®äº"
- msg11="ã¢ã³ã¤ã³ã¹ãã¼ã«ä¸ã§ã"
-else
- msg1="This distribution may not be debian/ubuntu."
- msg2="The code name is : "
- msg3="This OS is not supported."
- msg4="No repository entry for OpenRTM-aist is configured in your system."
- msg5="repository entry for OpenrRTM-aist: "
- msg6="Do you want to add the repository entry for OpenrRTM-aist in source.list? (y/n) [y] "
- msg7="Abort."
- msg8="This script should be run as root."
- msg9="Now installing: "
- msg10="done."
- msg11="Now uninstalling: "
-
-fi
-
-}
-
-
-#----------------------------------------
-# è¿ããªãã¸ããªãµã¼ããæ¢ã
-#----------------------------------------
-check_reposerver()
-{
- minrtt=65535
- nearhost=''
- for host in $reposervers; do
- rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
- if test "x$rtt" = "x"; then
- rtt=65535
- fi
- if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
- minrtt=$rtt
- nearhost=$host
- fi
- done
- if test "x$nearhost" = "x"; then
- echo "Repository servers unreachable.", $hosts
- exit 1
- fi
- reposerver=$nearhost
-}
-
-
-#---------------------------------------
-# ãªãã¸ããªãµã¼ã
-#---------------------------------------
-create_srclist () {
- cnames="sarge etch lenny"
- for c in $cnames; do
- if test -f "/etc/apt/sources.list"; then
- res=`grep $c /etc/apt/sources.list`
- else
- echo $msg1
- exit
- fi
- if test ! "x$res" = "x" ; then
- code_name=$c
- fi
- done
- if test ! "x$code_name" = "x"; then
- echo $msg2 $code_name
- else
- echo $msg3
- exit
- fi
- openrtm_repo="deb http://$reposerver/pub/Linux/debian/ $code_name main"
-}
-
-#---------------------------------------
-# ã½ã¼ã¹ãªã¹ãæ´æ°é¢æ°ã®å®ç¾©
-#---------------------------------------
-update_source_list () {
- rtmsite=`grep $reposerver /etc/apt/sources.list`
- if test "x$rtmsite" = "x" ; then
- echo $msg4
- echo $msg5
- echo " " $openrtm_repo
- read -p $msg6 kick_shell
-
- if test "x$kick_shell" = "xn" ; then
- echo $msg7
- exit 0
- else
- echo $openrtm_repo >> /etc/apt/sources.list
- fi
- fi
-}
-
-#----------------------------------------
-# root ãã©ããããã§ãã¯
-#----------------------------------------
-check_root () {
- if test ! `id -u` = 0 ; then
- echo ""
- echo $msg8
- echo $msg7
- echo ""
- exit 1
- fi
-}
-
-#----------------------------------------
-# ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«é¢æ°
-#----------------------------------------
-install_packages () {
- for p in $*; do
- echo $msg9 $pã
- apt-get install $p
- echo $msg10
- echo ""
- done
-}
-
-#------------------------------------------------------------
-# ãªã¹ããéé ã«ãã
-#------------------------------------------------------------
-reverse () {
- for i in $*; do
- echo $i
- done | sed '1!G;h;$!d'
-}
-
-#----------------------------------------
-# ããã±ã¼ã¸ãã¢ã³ã¤ã³ã¹ãã¼ã«ãã
-#----------------------------------------
-uninstall_packages () {
- for p in $*; do
- echo $msg11 $p
- aptitude remove $p
- echo $msg10
- echo ""
- done
-}
-
-#---------------------------------------
-# ã¡ã¤ã³
-#---------------------------------------
-check_lang
-check_root
-
-if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
- openrtm=$openrtm04
- packages="$devel $omni $ace $pyyaml $openrtm"
-fi
-
-if test "x$1" = "x-u" ; then
- uninstall_packages `reverse $u_packages`
-else
- check_reposerver
- create_srclist
- update_source_list
- apt-get update
- install_packages $packages
-fi
Deleted: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_fedora.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_fedora.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_fedora.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -1,163 +0,0 @@
-#!/bin/sh
-#
-# @file pkg_install_fedora.sh
-# @brief OpenRTM-aist dependent packages install script for Fedora
-# @author Noriaki Ando <n-ando at aist.go.jp>
-# Shinji Kurihara
-# Tetsuo Ando
-#
-# このシェルスクリプトは、aceおよびomniORBのパッケージをインストールし、
-# fedoraの開発環境を構築します。
-#
-# $Id$
-#
-
-#---------------------------------------
-# パッケージリスト
-#---------------------------------------
-omni="omniORB omniORB-devel omniORB-doc omniORB-servers omniORB-utils omniORB-bootscripts"
-ace="ace ace-devel"
-openrtm="OpenRTM-aist OpenRTM-aist-devel OpenRTM-aist-doc OpenRTM-aist-example PyYAML"
-openrtm04="OpenRTM-aist-0.4.2 OpenRTM-aist-devel-0.4.2 OpenRTM-aist-doc-0.4.2 OpenRTM-aist-example-0.4.2 PyYAML"
-packages="gcc-c++ uuid-devel libuuid-devel $omni $openrtm"
-
-reposervers="www.openrtm.org www.openrtm.de"
-reposerver=""
-
-#----------------------------------------
-# root かどうかをチェック
-#----------------------------------------
-check_root () {
- if test ! `id -u` = 0 ; then
- echo ""
- echo "This script should be run by root user."
- echo "Abort."
- echo ""
- exit 1
- fi
-}
-
-#---------------------------------------
-# インストール済パッケージリスト
-#---------------------------------------
-rpm_qa="/tmp/yum_list.txt"
-get_pkg_list () {
- rpm -qa > $rpm_qa
-}
-clean_pkg_list () {
- rm -f $rpm_qa
-}
-
-#----------------------------------------
-# 近いリポジトリサーバを探す
-#----------------------------------------
-check_reposerver()
-{
- minrtt=65535
- nearhost=''
- for host in $reposervers; do
- rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
- if test "x$rtt" = "x"; then
- rtt=65535
- fi
- if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
- minrtt=$rtt
- nearhost=$host
- fi
- done
- if test "x$nearhost" = "x"; then
- echo "Repository servers unreachable.", $hosts
- exit 1
- fi
- reposerver=$nearhost
-}
-
-
-#---------------------------------------
-# リポジトリサイト設定ファイルを生成
-#---------------------------------------
-openrtm_repo () {
-cat <<EOF
-[openrtm]
-name=Fedora \$releasever - \$basearch
-failovermethod=priority
-baseurl=http://$reposerver/pub/Linux/Fedora/releases/\$releasever/Fedora/\$basearch/os/Packages
-enabled=1
-gpgcheck=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-EOF
-}
-
-create_repo() {
- repo="/etc/yum.repos.d/openrtm.repo"
- if test ! -f $repo ; then
- echo "OpenRTM-aist のリポジトリが登録されていません。"
- echo "OpenRTM-aist のリポジトリ: "
- echo " http://www.openrtm.org/pub/Linux/Fedora/"
- read -p "を追加します。よろしいですか? (y/n) [y] " kick_shell
-
- if test "x$kick_shell" = "xn" ; then
- echo "中断します。"
- exit 0
- else
- openrtm_repo > /etc/yum.repos.d/openrtm.repo
- fi
- fi
-}
-
-#----------------------------------------
-# パッケージインストール関数
-#----------------------------------------
-install_packages () {
- for p in $*; do
- ins=`rpm -qa $p`
- if test "x$ins" = "x"; then
- echo "Now installing: " $p
- yum install $p
- echo "done."
- echo ""
- else
- echo $p "is already installed."
- echo ""
- fi
- done
-}
-
-#------------------------------------------------------------
-# リストを逆順にする
-#------------------------------------------------------------
-reverse () {
- for i in $*; do
- echo $i
- done | sed '1!G;h;$!d'
-}
-
-#----------------------------------------
-# パッケージをアンインストールする
-#----------------------------------------
-uninstall_packages () {
- for p in $*; do
- echo "Now uninstalling: " $p
- yum erase $p
- echo "done."
- echo ""
- done
-}
-
-#---------------------------------------
-# メイン
-#---------------------------------------
-check_root
-
-if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
- openrtm=$openrtm04
- packages="$devel $omni $ace $openrtm"
-fi
-
-if test "x$1" = "x-u" ; then
- uninstall_packages `reverse $packages`
-else
- check_reposerver
- create_repo
- install_packages $packages
-fi
Deleted: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_ubuntu.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_ubuntu.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install100_ubuntu.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -1,200 +0,0 @@
-#!/bin/sh
-#
-# @file pkg_install_ubuntu.sh
-# @brief OpenRTM-aist dependent packages install script for Debian-sarge
-# @author Noriaki Ando <n-ando at aist.go.jp>
-# Shinji Kurihara
-# Tetsuo Ando
-# Harumi Miyamoto
-#
-
-#---------------------------------------
-# ããã±ã¼ã¸ãªã¹ã
-#---------------------------------------
-omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver"
-ace="libace libace-dev"
-openrtm="openrtm-aist openrtm-aist-doc openrtm-aist-dev openrtm-aist-example python-yaml"
-openrtm04="openrtm-aist=0.4.2-1 openrtm-aist-doc=0.4.2-1 openrtm-aist-dev=0.4.2-1 openrtm-aist-example=0.4.2-1 python-yaml"
-devel="gcc g++ make uuid-dev"
-packages="$devel $omni $openrtm"
-u_packages="$omni $ace $openrtm "
-
-reposervers="www.openrtm.org www.openrtm.de"
-reposerver=""
-
-#---------------------------------------
-# ãã±ã¼ã«ã®è¨èªç¢ºèª
-#---------------------------------------
-check_lang()
-{
-lang="en"
-
-locale | grep ja_JP > /dev/null && lang="jp"
-
-if test "$lang" = "jp" ;then
- msg1="ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã確èªãã¦ãã ããã\nDebianãUbuntu以å¤ã®OSã®å¯è½æ§ãããã¾ãã"
- msg2="ã³ã¼ããã¼ã :"
- msg3="ãã®OSã¯ãµãã¼ããã¦ããã¾ããã"
- msg4="OpenRTM-aist ã®ãªãã¸ããªãç»é²ããã¦ãã¾ããã"
- msg5="Source.list ã« OpenRTM-aist ã®ãªãã¸ããª: "
- msg6="ã追å ãã¾ããããããã§ããï¼(y/n)[y] "
- msg7="ä¸æãã¾ãã"
- msg8="ã«ã¼ãã¦ã¼ã¶ã¼ã§å®è¡ãã¦ãã ããã"
- msg9="ã¤ã³ã¹ãã¼ã«ä¸ã§ã..."
- msg10="å®äº"
- msg11="ã¢ã³ã¤ã³ã¹ãã¼ã«ä¸ã§ã."
-else
- msg1="This distribution may not be debian/ubuntu."
- msg2="The code name is : "
- msg3="This OS is not supported."
- msg4="No repository entry for OpenRTM-aist is configured in your system."
- msg5="repository entry for OpenrRTM-aist: "
- msg6="Do you want to add new repository entry for OpenrRTM-aist in source.list? (y/n) [y] "
- msg7="Abort."
- msg8="This script should be run as root."
- msg9="Now installing: "
- msg10="done."
- msg11="Now uninstalling: "
-fi
-
-}
-
-#----------------------------------------
-# è¿ããªãã¸ããªãµã¼ããæ¢ã
-#----------------------------------------
-check_reposerver()
-{
- minrtt=65535
- nearhost=''
- for host in $reposervers; do
- rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
- if test "x$rtt" = "x"; then
- rtt=65535
- fi
- if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
- minrtt=$rtt
- nearhost=$host
- fi
- done
- if test "x$nearhost" = "x"; then
- echo "Repository servers unreachable.", $hosts
- exit 1
- fi
- reposerver=$nearhost
-}
-
-
-#---------------------------------------
-# ãªãã¸ããªãµã¼ã
-#---------------------------------------
-create_srclist () {
- codename=`sed -n /DISTRIB_CODENAME=/p /etc/lsb-release`
- cnames=`echo "$codename" | sed 's/DISTRIB_CODENAME=//'`
- #cnames="sarge edgy feisty gutsy hardy intrepid"
- for c in $cnames; do
- if test -f "/etc/apt/sources.list"; then
- res=`grep $c /etc/apt/sources.list`
- else
- echo $msg1
- exit
- fi
- if test ! "x$res" = "x" ; then
- code_name=$c
- fi
- done
- if test ! "x$code_name" = "x"; then
- echo $msg2 $code_name
- else
- echo $msg3
- exit
- fi
- openrtm_repo="deb http://$reposerver/pub/Linux/ubuntu/ $code_name main"
-}
-
-#---------------------------------------
-# ã½ã¼ã¹ãªã¹ãæ´æ°é¢æ°ã®å®ç¾©
-#---------------------------------------
-update_source_list () {
- rtmsite=`grep $reposerver /etc/apt/sources.list`
- if test "x$rtmsite" = "x" ; then
- echo $msg4
- echo $msg5
- echo " " $openrtm_repo
- read -p $msg6 kick_shell
-
- if test "x$kick_shell" = "xn" ; then
- echo $msg7
- exit 0
- else
- echo $openrtm_repo >> /etc/apt/sources.list
- fi
- fi
-}
-
-#----------------------------------------
-# root ãã©ããããã§ãã¯
-#----------------------------------------
-check_root () {
- if test ! `id -u` = 0 ; then
- echo ""
- echo $msg8
- echo $msg7
- echo ""
- exit 1
- fi
-}
-
-#----------------------------------------
-# ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«é¢æ°
-#----------------------------------------
-install_packages () {
- for p in $*; do
- echo $msg9 $p
- apt-get install $p
- echo $msg10
- echo ""
- done
-}
-
-#------------------------------------------------------------
-# ãªã¹ããéé ã«ãã
-#------------------------------------------------------------
-reverse () {
- for i in $*; do
- echo $i
- done | sed '1!G;h;$!d'
-}
-
-#----------------------------------------
-# ããã±ã¼ã¸ãã¢ã³ã¤ã³ã¹ãã¼ã«ãã
-#----------------------------------------
-uninstall_packages () {
- for p in $*; do
- echo $msg11 $p
- aptitude remove $p
- echo $msg10
- echo ""
- done
-}
-
-#---------------------------------------
-# ã¡ã¤ã³
-#---------------------------------------
-check_lang
-check_root
-
-if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
- openrtm=$openrtm04
- packages="$devel $omni $ace $openrtm"
-fi
-
-if test "x$1" = "x-u" ; then
- uninstall_packages `reverse $u_packages`
-else
- check_reposerver
- create_srclist
- update_source_list
- apt-get update
- install_packages $packages
-fi
-
Modified: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_debian.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_debian.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_debian.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -6,18 +6,31 @@
# Shinji Kurihara
# Tetsuo Ando
# Harumi Miyamoto
+# Nobu Kawauchi
#
#---------------------------------------
# ããã±ã¼ã¸ãªã¹ã
#---------------------------------------
-omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver"
+set_package_list()
+{
+if [ "$code_name" = "wheezy" ]; then
+ omni="libomniorb4-1 libomniorb4-dev omniidl omniorb-nameserver"
+else
+ omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver"
+fi
+ace="libace libace-dev"
openrtm="openrtm-aist openrtm-aist-doc openrtm-aist-dev openrtm-aist-example"
+openrtm04="openrtm-aist=0.4.2-1 openrtm-aist-doc=0.4.2-1 openrtm-aist-dev=0.4.2-1 openrtm-aist-example=0.4.2-1"
pyyaml="python-support python-yaml"
devel="gcc g++ make uuid-dev"
packages="$devel $omni $pyyaml $openrtm"
-u_packages="$omni $openrtm "
+u_packages="$omni $ace $openrtm "
+reposervers="www.openrtm.org www.openrtm.de"
+reposerver=""
+}
+
#---------------------------------------
# ãã±ã¼ã«ã®è¨èªç¢ºèª
#---------------------------------------
@@ -33,7 +46,7 @@
msg3="ãã®OSã¯ãµãã¼ãããã¦ããã¾ããã"
msg4=" OpenRTM-aistã®ãªãã¸ããªãç»é²ããã¦ãã¾ããã"
msg5="Source.listã«OpenrRTM-aistã®ãªãã¸ããªï¼"
- msg6="ã追å ãã¾ããããããã§ããï¼ (y/n) [y] "
+ msg6="ã追å ãã¾ããããããã§ããï¼(y/n)[y] "
msg7="ä¸æãã¾ãã"
msg8="ã«ã¼ãã¦ã¼ã¶ã¼ã§å®è¡ãã¦ãã ããã"
msg9="ã¤ã³ã¹ãã¼ã«ä¸ã§ã..."
@@ -45,7 +58,7 @@
msg3="This OS is not supported."
msg4="No repository entry for OpenRTM-aist is configured in your system."
msg5="repository entry for OpenrRTM-aist: "
- msg6="Do you want to add the repository entry for OpenrRTM-aist in source.list? (y/n) [y] "
+ msg6="Do you want to add the repository entry for OpenrRTM-aist in source.list?(y/n)[y] "
msg7="Abort."
msg8="This script should be run as root."
msg9="Now installing: "
@@ -57,10 +70,10 @@
}
#---------------------------------------
-# ãªãã¸ããªãµã¼ã
+# ã³ã¼ããã¼ã åå¾
#---------------------------------------
-create_srclist () {
- cnames="sarge etch lenny"
+check_codename () {
+ cnames="sarge etch lenny squeeze wheezy"
for c in $cnames; do
if test -f "/etc/apt/sources.list"; then
res=`grep $c /etc/apt/sources.list`
@@ -78,14 +91,45 @@
echo $msg3
exit
fi
- openrtm_repo="deb http://www.openrtm.org/pub/Linux/debian/ $code_name main"
}
+#----------------------------------------
+# è¿ããªãã¸ããªãµã¼ããæ¢ã
+#----------------------------------------
+check_reposerver()
+{
+ minrtt=65535
+ nearhost=''
+ for host in $reposervers; do
+ rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
+ if test "x$rtt" = "x"; then
+ rtt=65535
+ fi
+ if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
+ minrtt=$rtt
+ nearhost=$host
+ fi
+ done
+ if test "x$nearhost" = "x"; then
+ echo "Repository servers unreachable.", $hosts
+ exit 1
+ fi
+ reposerver=$nearhost
+}
+
+
#---------------------------------------
+# ãªãã¸ããªãµã¼ã
+#---------------------------------------
+create_srclist () {
+ openrtm_repo="deb http://$reposerver/pub/Linux/debian/ $code_name main"
+}
+
+#---------------------------------------
# ã½ã¼ã¹ãªã¹ãæ´æ°é¢æ°ã®å®ç¾©
#---------------------------------------
update_source_list () {
- rtmsite=`grep openrtm /etc/apt/sources.list`
+ rtmsite=`grep $reposerver /etc/apt/sources.list`
if test "x$rtmsite" = "x" ; then
echo $msg4
echo $msg5
@@ -119,7 +163,7 @@
#----------------------------------------
install_packages () {
for p in $*; do
- echo $msg9 $p
+ echo $msg9 $pã
apt-get install $p
echo $msg10
echo ""
@@ -140,10 +184,13 @@
#----------------------------------------
uninstall_packages () {
for p in $*; do
- echo $msg11 $p
- aptitude remove $p
- echo $msg10
- echo ""
+ echo $msg11 $p
+ apt-get remove $p
+ if test "$?" != 0; then
+ apt-get purge $p
+ fi
+ echo $msg10
+ echo ""
done
}
@@ -152,12 +199,22 @@
#---------------------------------------
check_lang
check_root
+check_codename
+set_package_list
+
+if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
+ openrtm=$openrtm04
+ packages="$devel $omni $ace $pyyaml $openrtm"
+fi
+
if test "x$1" = "x-u" ; then
uninstall_packages `reverse $u_packages`
else
+ check_reposerver
create_srclist
update_source_list
+ apt-get autoclean
apt-get update
+ uninstall_packages `reverse $openrtm`
install_packages $packages
fi
-
Modified: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_fedora.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_fedora.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_fedora.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -5,23 +5,35 @@
# @author Noriaki Ando <n-ando at aist.go.jp>
# Shinji Kurihara
# Tetsuo Ando
+# Nobu Kawauchi
#
-# このシェルスクリプトは、aceおよびomniORBのパッケージをインストールし、
-# fedoraの開発環境を構築します。
+# ãã®ã·ã§ã«ã¹ã¯ãªããã¯ãaceããã³omniORBã®ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã
+# fedoraã®éçºç°å¢ãæ§ç¯ãã¾ãã
#
# $Id$
#
-
#---------------------------------------
-# パッケージリスト
+# ããã±ã¼ã¸ãªã¹ã
#---------------------------------------
-omni="omniORB omniORB-devel omniORB-doc omniORB-servers omniORB-utils omniORB-bootscripts"
+version_num=`cat /etc/fedora-release | awk '/Fedora/{print $3}' -`
+if [ $version_num -ge 16 ] && [ $version_num -le 18 ]; then
+ # ãã¼ã¸ã§ã³ã16,17,18ã®å ´å
+ omni="omniORB omniORB-devel omniORB-doc omniORB-servers omniORB-utils"
+else
+ omni="omniORB omniORB-devel omniORB-doc omniORB-servers omniORB-utils omniORB-bootscripts"
+fi
+
+ace="ace ace-devel"
openrtm="OpenRTM-aist OpenRTM-aist-devel OpenRTM-aist-doc OpenRTM-aist-example PyYAML"
-packages="gcc-c++ $omni $openrtm"
+openrtm04="OpenRTM-aist-0.4.2 OpenRTM-aist-devel-0.4.2 OpenRTM-aist-doc-0.4.2 OpenRTM-aist-example-0.4.2 PyYAML"
+devel="gcc-c++ uuid-devel libuuid-devel"
+packages="$devel $omni $openrtm"
+reposervers="www.openrtm.org www.openrtm.de"
+reposerver=""
#----------------------------------------
-# root かどうかをチェック
+# root ãã©ããããã§ãã¯
#----------------------------------------
check_root () {
if test ! `id -u` = 0 ; then
@@ -34,7 +46,7 @@
}
#---------------------------------------
-# インストール済パッケージリスト
+# ã¤ã³ã¹ãã¼ã«æ¸ããã±ã¼ã¸ãªã¹ã
#---------------------------------------
rpm_qa="/tmp/yum_list.txt"
get_pkg_list () {
@@ -44,30 +56,56 @@
rm -f $rpm_qa
}
+#----------------------------------------
+# è¿ããªãã¸ããªãµã¼ããæ¢ã
+#----------------------------------------
+check_reposerver()
+{
+ minrtt=65535
+ nearhost=''
+ for host in $reposervers; do
+ rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
+ if test "x$rtt" = "x"; then
+ rtt=65535
+ fi
+ if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
+ minrtt=$rtt
+ nearhost=$host
+ fi
+ done
+ if test "x$nearhost" = "x"; then
+ echo "Repository servers unreachable.", $hosts
+ exit 1
+ fi
+ reposerver=$nearhost
+}
+
+
#---------------------------------------
-# リポジトリサイト設定ファイルを生成
+# ãªãã¸ããªãµã¤ãè¨å®ãã¡ã¤ã«ãçæ
#---------------------------------------
openrtm_repo () {
cat <<EOF
[openrtm]
name=Fedora \$releasever - \$basearch
failovermethod=priority
-baseurl=http://www.openrtm.org/pub/Linux/Fedora/releases/\$releasever/Fedora/\$basearch/os/Packages
+baseurl=http://$reposerver/pub/Linux/Fedora/releases/\$releasever/Fedora/\$basearch/os/Packages
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
EOF
}
+
create_repo() {
repo="/etc/yum.repos.d/openrtm.repo"
if test ! -f $repo ; then
- echo "OpenRTM-aist のリポジトリが登録されていません。"
- echo "OpenRTM-aist のリポジトリ: "
+ echo "OpenRTM-aist ã®ãªãã¸ããªãç»é²ããã¦ãã¾ããã"
+ echo "OpenRTM-aist ã®ãªãã¸ããª: "
echo " http://www.openrtm.org/pub/Linux/Fedora/"
- read -p "を追加します。よろしいですか? (y/n) [y] " kick_shell
+ read -p "ã追å ãã¾ããããããã§ããï¼ (y/n) [y] " kick_shell
if test "x$kick_shell" = "xn" ; then
- echo "中断します。"
+ echo "ä¸æãã¾ãã"
exit 0
else
openrtm_repo > /etc/yum.repos.d/openrtm.repo
@@ -76,44 +114,25 @@
}
#----------------------------------------
-# パッケージインストール関数
+# ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«é¢æ°
#----------------------------------------
install_packages () {
for p in $*; do
- if test "x$p" = "x0.4.2" || test "x$p" = "x0.4.2" ; then
- :
+ ins=`rpm -qa $p`
+ if test "x$ins" = "x"; then
+ echo "Now installing: " $p
+ yum install $p
+ echo "done."
+ echo ""
else
- if echo "$p" | grep -q '=0.4.2' ; then
- str=`echo "$p" |sed 's/=0.4.2//'`
- else
- str="$p"
- fi
-
- ins=`rpm -qa $str`
-
- if test "x$ins" = "x"; then
- echo "Now installing: " $p
- yum install $p
- echo "done."
- echo ""
- else
- if echo "$ins" |grep -q '0.4.2-0' ; then
- yum install $p
- echo "done."
- echo ""
- else
- echo $ins
- echo $str "is already installed."
- echo ""
- fi
- fi
+ echo $p "is already installed."
+ echo ""
fi
done
}
-
#------------------------------------------------------------
-# リストを逆順にする
+# ãªã¹ããéé ã«ãã
#------------------------------------------------------------
reverse () {
for i in $*; do
@@ -122,7 +141,7 @@
}
#----------------------------------------
-# パッケージをアンインストールする
+# ããã±ã¼ã¸ãã¢ã³ã¤ã³ã¹ãã¼ã«ãã
#----------------------------------------
uninstall_packages () {
for p in $*; do
@@ -134,12 +153,19 @@
}
#---------------------------------------
-# メイン
+# ã¡ã¤ã³
#---------------------------------------
check_root
+
+if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
+ openrtm=$openrtm04
+ packages="$devel $omni $ace $openrtm"
+fi
+
if test "x$1" = "x-u" ; then
uninstall_packages `reverse $packages`
else
+ check_reposerver
create_repo
install_packages $packages
fi
Modified: branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_ubuntu.sh
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_ubuntu.sh 2013-05-09 00:35:56 UTC (rev 2387)
+++ branches/RELENG_1_1/OpenRTM-aist/build/pkg_install_ubuntu.sh 2013-05-10 00:25:24 UTC (rev 2388)
@@ -11,12 +11,17 @@
#---------------------------------------
# ããã±ã¼ã¸ãªã¹ã
#---------------------------------------
-omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver"
+omni="libomniorb4 libomniorb4-dev omniidl4 omniorb4-nameserver omniidl omniorb-nameserver"
+ace="libace libace-dev"
openrtm="openrtm-aist openrtm-aist-doc openrtm-aist-dev openrtm-aist-example python-yaml"
-devel="gcc g++ make uuid-dev"
+openrtm04="openrtm-aist=0.4.2-1 openrtm-aist-doc=0.4.2-1 openrtm-aist-dev=0.4.2-1 openrtm-aist-example=0.4.2-1 python-yaml"
+devel="gcc g++ make uuid-dev libboost-filesystem-dev"
packages="$devel $omni $openrtm"
-u_packages="$omni $openrtm "
+u_packages="$omni $ace $openrtm "
+reposervers="www.openrtm.org www.openrtm.de"
+reposerver=""
+
#---------------------------------------
# ãã±ã¼ã«ã®è¨èªç¢ºèª
#---------------------------------------
@@ -54,7 +59,31 @@
}
+#----------------------------------------
+# è¿ããªãã¸ããªãµã¼ããæ¢ã
+#----------------------------------------
+check_reposerver()
+{
+ minrtt=65535
+ nearhost=''
+ for host in $reposervers; do
+ rtt=`ping -c 1 $host | grep 'time=' | sed -e 's/^.*time=\([0-9\.]*\) ms.*/\1/' 2> /dev/null`
+ if test "x$rtt" = "x"; then
+ rtt=65535
+ fi
+ if test `echo "scale=2 ; $rtt < $minrtt" | bc` -gt 0; then
+ minrtt=$rtt
+ nearhost=$host
+ fi
+ done
+ if test "x$nearhost" = "x"; then
+ echo "Repository servers unreachable.", $hosts
+ exit 1
+ fi
+ reposerver=$nearhost
+}
+
#---------------------------------------
# ãªãã¸ããªãµã¼ã
#---------------------------------------
@@ -79,14 +108,14 @@
echo $msg3
exit
fi
- openrtm_repo="deb http://www.openrtm.org/pub/Linux/ubuntu/ $code_name main"
+ openrtm_repo="deb http://$reposerver/pub/Linux/ubuntu/ $code_name main"
}
#---------------------------------------
# ã½ã¼ã¹ãªã¹ãæ´æ°é¢æ°ã®å®ç¾©
#---------------------------------------
update_source_list () {
- rtmsite=`grep openrtm /etc/apt/sources.list`
+ rtmsite=`grep '^$openrtm_repo' /etc/apt/sources.list`
if test "x$rtmsite" = "x" ; then
echo $msg4
echo $msg5
@@ -142,8 +171,11 @@
uninstall_packages () {
for p in $*; do
echo $msg11 $p
- aptitude remove $p
- echo $msg10
+ apt-get remove $p
+ if test "$?" != 0; then
+ apt-get purge $p
+ fi
+ echo $msg10
echo ""
done
}
@@ -153,12 +185,21 @@
#---------------------------------------
check_lang
check_root
+
+if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
+ openrtm=$openrtm04
+ packages="$devel $omni $ace $openrtm"
+fi
+
if test "x$1" = "x-u" ; then
uninstall_packages `reverse $u_packages`
else
+ check_reposerver
create_srclist
update_source_list
+ apt-get autoclean
apt-get update
+ uninstall_packages `reverse $openrtm`
install_packages $packages
fi
More information about the openrtm-commit
mailing list