[openrtm-commit:01947] r709 - trunk/OpenRTM-aist-Python/installer/install_scripts

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 5月 24日 (火) 17:49:26 JST


Author: takahashi
Date: 2016-05-24 17:49:25 +0900 (Tue, 24 May 2016)
New Revision: 709

Modified:
   trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_debian.sh
   trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh
   trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh
   trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_vine.sh
Log:
[compat] add "force yes" mode to run install test automatically

Modified: trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_debian.sh
===================================================================
--- trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_debian.sh	2016-04-26 09:23:09 UTC (rev 708)
+++ trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_debian.sh	2016-05-24 08:49:25 UTC (rev 709)
@@ -7,8 +7,16 @@
 #         Tetsuo Ando
 #         Harumi Miyamoto
 #         Nobu Kawauchi
+#         Saburo Takahashi
 #
 
+# Usage: sudo pkg_install_python_debian.sh [-u -y -h]
+# option -u            : Uninstall tool_packages.
+# option -y            : When yes/no prompt for installing would be presente    d, assume that the user entered "yes".
+# option -h            : Display a brief help message.
+#
+
+
 #---------------------------------------
 # パッケージリスト
 #---------------------------------------
@@ -129,7 +137,7 @@
 install_packages () {
     for p in $*; do
 	echo $msg9 $p
-	apt-get install $p
+	apt-get install $p $force_yes
 	echo $msg10
 	echo ""
     done
@@ -157,13 +165,34 @@
 }
 
 #---------------------------------------
+# USAGE
+#---------------------------------------
+howto_usage(){
+    cat << EOF
+Usage: sudo $0 [-u -y -h]
+       option -u            : Uninstall tool_packages.
+       option -y            : When yes/no prompt for installing would be presented, assume that the user entered "yes".
+       option -h            : Display a brief help message.
+EOF
+}
+
+#---------------------------------------
 # メイン
 #---------------------------------------
+if test "x$1" = "x-h" ; then
+    howto_usage
+    exit 1
+fi
+
 check_lang
 check_root
 check_codename
 set_package_list
 
+if test "x$1" = "x-y" ; then
+    force_yes="-y --force-yes"
+fi
+
 if test "x$1" = "x-u" ; then
     uninstall_packages `reverse $u_packages`
 else

Modified: trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh
===================================================================
--- trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh	2016-04-26 09:23:09 UTC (rev 708)
+++ trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh	2016-05-24 08:49:25 UTC (rev 709)
@@ -6,6 +6,7 @@
 #         Shinji Kurihara
 #         Tetsuo Ando
 #         Nobu Kawauchi
+#         Saburo Takahashi
 #
 # このシェルスクリプトは、aceおよびomniORBのパッケージをインストールし、
 # fedoraの開発環境を構築します。
@@ -13,6 +14,13 @@
 # $Id$
 #
 
+# Usage: sudo pkg_install_python_fedora.sh [-u -y -h]
+# option -u            : Uninstall tool_packages.
+# option -y            : When yes/no prompt for installing would be presente    d, assume that the user entered "yes".
+# option -h            : Display a brief help message.
+#
+
+
 #---------------------------------------
 # パッケージリスト
 #---------------------------------------
@@ -101,7 +109,7 @@
 	else
 	    if echo "$p" | grep -q '=0.4.2' ; then
 		str=`echo "$p" |sed 's/=0.4.2//'`
-	    else 
+	    else
 		str="$p"
 	    fi
 
@@ -109,15 +117,15 @@
 
 	    if test "x$ins" = "x"; then
 		echo "Now installing: " $p
-		$COMMAND install $p
+		$COMMAND install $p $force_yes
 		echo "done."
 		echo ""
-	    else  
+	    else
 		if echo "$ins" |grep -q '0.4.2-0' ; then
 			$COMMAND install $p
-			echo "done." 
+			echo "done."
 			echo ""
-	       else 
+	       else
  		    echo $ins
 		    echo $str "is already installed."
 		    echo ""
@@ -150,9 +158,31 @@
 }
 
 #---------------------------------------
+# USAGE
+#---------------------------------------
+howto_usage(){
+    cat << EOF
+Usage: sudo $0 [-u -y -h]
+       option -u            : Uninstall tool_packages.
+       option -y            : When yes/no prompt for installing would be presented, assume that the user entered "yes".
+       option -h            : Display a brief help message.
+EOF
+}
+
+#---------------------------------------
 # メイン
 #---------------------------------------
+if test "x$1" = "x-h" ; then
+    howto_usage
+    exit 1
+fi
+
 check_root
+
+if test "x$1" = "x-y" ; then
+    force_yes="-y"
+fi
+
 if test "x$1" = "x-u" ; then
     uninstall_packages `reverse $u_packages`
 else

Modified: trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh
===================================================================
--- trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh	2016-04-26 09:23:09 UTC (rev 708)
+++ trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_ubuntu.sh	2016-05-24 08:49:25 UTC (rev 709)
@@ -7,8 +7,15 @@
 #         Tetsuo Ando
 #         Harumi Miyamoto
 #         Nobu Kawauchi
+#         Saburo Takahashi
 #
 
+# Usage: sudo pkg_install_python_ubuntu.sh [-u -y -h]
+# option -u            : Uninstall tool_packages.
+# option -y            : When yes/no prompt for installing would be presented, assume that the user entered "yes".
+# option -h            : Display a brief help message.
+#
+
 this_file=${0##*/}
 
 rtm_ver=`echo "$this_file" | sed -e "s/pkg_install_python_ubuntu-//g" -e "s/\.sh//g"`
@@ -142,7 +149,7 @@
 install_packages () {
     for p in $*; do
 	echo $msg9 $p
-	apt-get install $p
+	apt-get install $p $force_yes
 	echo $msg10
 	echo ""
     done
@@ -170,13 +177,34 @@
 }
 
 #---------------------------------------
+# USAGE
+#---------------------------------------
+howto_usage(){
+    cat << EOF
+Usage: sudo $0 [-u -y -h]
+       option -u            : Uninstall tool_packages.
+       option -y            : When yes/no prompt for installing would be presented, assume that the user entered "yes".
+       option -h            : Display a brief help message.
+EOF
+}
+
+#---------------------------------------
 # メイン
 #---------------------------------------
+if test "x$1" = "x-h" ; then
+    howto_usage
+    exit 1
+fi
+
 check_lang
 check_root
 check_codename
 set_package_list
 
+if test "x$1" = "x-y" ; then
+    force_yes="-y --force-yes"
+fi
+
 if test "x$1" = "x-u" ; then
     uninstall_packages `reverse $u_packages`
 else

Modified: trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_vine.sh
===================================================================
--- trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_vine.sh	2016-04-26 09:23:09 UTC (rev 708)
+++ trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_vine.sh	2016-05-24 08:49:25 UTC (rev 709)
@@ -5,10 +5,17 @@
 # @author Noriaki Ando <n-ando at aist.go.jp>
 #         Shinji Kurihara
 #         Tetsuo Ando
+#         Saburo Takahashi
 #
 # このシェルスクリプトは、aceおよびomniORBのパッケージをインストールし、
 # Vine Linuxの開発環境を構築します。
 #
+# Usage: sudo pkg_install_python_vine.sh [-u -y -h]
+# option -u            : Uninstall tool_packages.
+# option -y            : When yes/no prompt for installing would be presente    d, assume that the user entered "yes".
+# option -h            : Display a brief help message.
+#
+
 #---------------------------------------
 # Vineバージョン特定
 #---------------------------------------
@@ -72,7 +79,7 @@
 	else
 	    if echo "$p" | grep -q '=0.4.2' ; then
 		str=`echo "$p" |sed 's/=0.4.2//'`
-	    else 
+	    else
 		str="$p"
 	    fi
 
@@ -80,15 +87,15 @@
 
 	    if test "x$ins" = "x"; then
 		echo "Now installing: " $p
-		apt-get install $p
+		apt-get install $p $force_yes
 		echo "done."
 		echo ""
-	    else  
+	    else
 		if echo "$ins" |grep -q '0.4.2-0' ; then
-			apt-get install $p
-			echo "done." 
+			apt-get install $p $force_yes
+			echo "done."
 			echo ""
-	       else 
+	       else
  		    echo $ins
 		    echo $str "is already installed."
 		    echo ""
@@ -120,12 +127,32 @@
     done
 }
 
+#---------------------------------------
+# USAGE
+#---------------------------------------
+howto_usage(){
+    cat << EOF
+Usage: sudo $0 [-u -y -h]
+       option -u            : Uninstall tool_packages.
+       option -y            : When yes/no prompt for installing would be presented, assume that the user entered "yes".
+       option -h            : Display a brief help message.
+EOF
+}
 
-
 #---------------------------------------
 # メイン
 #---------------------------------------
+if test "x$1" = "x-h" ; then
+    howto_usage
+    exit 1
+fi
+
 check_root
+
+if test "x$1" = "x-y" ; then
+    force_yes="-y --force-yes"
+fi
+
 if test "x$1" = "x-u" ; then
     uninstall_packages `reverse $packages`
 else



More information about the openrtm-commit mailing list