[openrtm-commit:01539] r2610 - trunk/OpenRTM-aist/build
openrtm @ openrtm.org
openrtm @ openrtm.org
2015年 6月 9日 (火) 16:31:41 JST
Author: irie
Date: 2015-06-09 16:31:41 +0900 (Tue, 09 Jun 2015)
New Revision: 2610
Modified:
trunk/OpenRTM-aist/build/pkg_install_ubuntu.sh
Log:
Update pkg_install_ubuntu.sh by Irie
Modified: trunk/OpenRTM-aist/build/pkg_install_ubuntu.sh
===================================================================
--- trunk/OpenRTM-aist/build/pkg_install_ubuntu.sh 2015-05-15 00:35:18 UTC (rev 2609)
+++ trunk/OpenRTM-aist/build/pkg_install_ubuntu.sh 2015-06-09 07:31:41 UTC (rev 2610)
@@ -6,23 +6,61 @@
# Shinji Kurihara
# Tetsuo Ando
# Harumi Miyamoto
+# Seisho Irie
#
+#
+# sudo sh pkg_install_ubuntu.sh [-s/-us/-d/-ud/-c/-uc/-r/-ur]
+# option -s : install tool_packages for build Source packages
+# option -us : Uninstall tool_packages for build Source packages
+# option -d : install tool_packages for build Distribution
+# option -ud : Uninstall tool_packages for build Distribution
+# option -c : install robot Component developer tool_packages
+# option -uc : Uninstall robot Component developer tool_packages
+# option -r : install robot component Runtime tool_packages
+# option -ur : Uninstall robot component Runtime tool_packages
+#
+
#---------------------------------------
# パッケージリスト
#---------------------------------------
omni="libomniorb4-dev omniidl"
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"
+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 $ace $openrtm "
-reposervers="www.openrtm.org www.openrtm.de"
+default_reposerver="openrtm.org"
+reposervers="openrtm.org"
reposerver=""
#---------------------------------------
+autotools="autoconf libtool"
+build_tools="gcc g++ make"
+dep_pkg="uuid-dev doxygen"
+deb_tools="build-essential debhelper devscripts"
+omni_devel="libomniorb4-dev omniidl omniorb-nameserver"
+omni_runtime="omniorb-nameserver"
+openrtm_devel="openrtm-aist-doc openrtm-aist-dev python-yaml"
+openrtm_runtime="openrtm-aist openrtm-aist-example"
+
+source_tools="subversion texlive texlive-lang-cjk xdvik-ja python-yaml"
+
+source_pkgs="$autotools $build_tools $dep_pkg $source_tools $omni_devel"
+u_source_pkgs="$autotools $build_tools $dep_pkg $source_tools $omni_devel"
+
+distribution_pkgs="$build_tools $dep_pkg $deb_tools $omni_devel"
+u_distribution_pkgs="$build_tools $dep_pkg $deb_tools $omni_devel"
+
+component_pkgs="$build_tools $dep_pkg $omni_devel $openrtm_devel $openrtm_runtime"
+u_component_pkgs="$build_tools $dep_pkg $omni_devel $openrtm_devel $openrtm_runtime"
+
+runtime_pkgs="$omni_runtime $openrtm_runtime"
+u_runtime_pkgs="$omni_runtime $openrtm_runtime"
+
+#---------------------------------------
# ロケールの言語確認
#---------------------------------------
check_lang()
@@ -78,7 +116,8 @@
done
if test "x$nearhost" = "x"; then
echo "Repository servers unreachable.", $hosts
- exit 1
+ echo "Check your internet connection. (or are you using proxy?)"
+ nearhost=$default_reposerver
fi
reposerver=$nearhost
}
@@ -115,7 +154,7 @@
# ソースリスト更新関数の定義
#---------------------------------------
update_source_list () {
- rtmsite=`grep '^$openrtm_repo' /etc/apt/sources.list`
+ rtmsite=`grep "$openrtm_repo" /etc/apt/sources.list`
if test "x$rtmsite" = "x" ; then
echo $msg4
echo $msg5
@@ -150,7 +189,7 @@
install_packages () {
for p in $*; do
echo $msg9 $p
- apt-get install $p
+ apt-get install --force-yes -y $p
echo $msg10
echo ""
done
@@ -172,34 +211,127 @@
for p in $*; do
echo $msg11 $p
aptitude remove $p
- if test "$?" != 0; then
- apt-get purge $p
- fi
- echo $msg10
+ if test "$?" != 0; then
+ apt-get purge $p
+ fi
+ echo $msg10
echo ""
done
}
#---------------------------------------
+# install tool_packages for build Source packages
+#---------------------------------------
+install_source_packages(){
+ echo "--------install $source_pkgs"
+ install_packages $source_pkgs
+}
+#---------------------------------------
+# Uninstall tool_packages for build Source packages
+#---------------------------------------
+uninstall_source_packages(){
+ echo "--------uninstall $u_source_pkgs"
+ uninstall_packages `reverse $u_source_pkgs`
+}
+#---------------------------------------
+# install tool_packages for build Distribution
+#---------------------------------------
+install_distribution(){
+ echo "--------install $distribution_pkgs"
+ install_packages $distribution_pkgs
+}
+#---------------------------------------
+# Uninstall tool_packages for build Distribution
+#---------------------------------------
+uninstall_distribution(){
+ echo "--------uninstall $u_distribution_pkgs"
+ uninstall_packages `reverse $u_distribution_pkgs`
+}
+#---------------------------------------
+# install robot Component developer tool_packages
+#---------------------------------------
+install_componet_developer(){
+ echo "--------install $component_pkgs()"
+ install_packages $component_pkgs
+}
+#---------------------------------------
+# Uninstall robot Component developer tool_packages
+#---------------------------------------
+uninstall_componet_developer(){
+ echo "--------uninstall $u_component_pkgs"
+ uninstall_packages `reverse $u_component_pkgs`
+}
+#---------------------------------------
+# install robot component Runtime tool_packages
+#---------------------------------------
+install_runtime(){
+ echo "--------install $runtime_pkgs"
+ install_packages $runtime_pkgs
+}
+#---------------------------------------
+# Uninstall robot component Runtime tool_packages
+#---------------------------------------
+uninstall_runtime(){
+ echo "--------uninstall $u_runtime_pkgs"
+ uninstall_packages `reverse $u_runtime_pkgs`
+}
+#---------------------------------------
+#
+#---------------------------------------
+howto_usage(){
+ echo "Usage: sudo sh pkg_install_ubuntu.sh [-s/-us/-d/-ud/-c/-uc/-r/-ur]"
+ echo " option -s : install tool_packages for build Source packages"
+ echo " option -us : Uninstall tool_packages for build Source packages"
+ echo " option -d : install tool_packages for build Distribution"
+ echo " option -ud : Uninstall tool_packages for build Distribution"
+ echo " option -c : install robot Component developer tool_packages"
+ echo " option -uc : Uninstall robot Component developer tool_packages"
+ echo " option -r : install robot component Runtime tool_packages"
+ echo " option -ur : Uninstall robot component Runtime tool_packages"
+}
+
+#---------------------------------------
# メイン
#---------------------------------------
check_lang
check_root
+check_reposerver
+create_srclist
+update_source_list
+apt-get autoclean
+apt-get update
-if test "x$1" = "x0.4.2" || test "x$1" = "x0.4" ; then
- openrtm=$openrtm04
- packages="$devel $omni $ace $openrtm"
+if test "x$1" = "x-s" ; then
+ install_source_packages
+ exit 0
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
+if test "x$1" = "x-us" ; then
+ uninstall_source_packages
+ exit 0
fi
+if test "x$1" = "x-d" ; then
+ install_distribution
+ exit 0
+fi
+if test "x$1" = "x-ud" ; then
+ uninstall_distribution
+ exit 0
+fi
+if test "x$1" = "x-c" ; then
+ install_componet_developer
+ exit 0
+fi
+if test "x$1" = "x-uc" ; then
+ uninstall_componet_developer
+ exit 0
+fi
+if test "x$1" = "x-r" ; then
+ install_runtime
+ exit 0
+fi
+if test "x$1" = "x-ur" ; then
+ uninstall_runtime
+ exit 0
+fi
+howto_usage
More information about the openrtm-commit
mailing list