[openrtm-commit:01613] r617 - trunk/OpenRTM-aist-Python/installer/install_scripts

openrtm @ openrtm.org openrtm @ openrtm.org
2015年 10月 22日 (木) 15:00:57 JST


Author: kawauchi
Date: 2015-10-22 15:00:57 +0900 (Thu, 22 Oct 2015)
New Revision: 617

Modified:
   trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh
Log:
[compat] Install script has been updated to support dnf command in fedora22.

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	2015-10-21 09:50:09 UTC (rev 616)
+++ trunk/OpenRTM-aist-Python/installer/install_scripts/pkg_install_python_fedora.sh	2015-10-22 06:00:57 UTC (rev 617)
@@ -27,6 +27,15 @@
 packages="$devel $omnipy $openrtm"
 u_packages="$omnipy $openrtm "
 
+#---------------------------------------
+# yum / dnf コマンド切替え
+#---------------------------------------
+if [ $version_num -ge 22 ]; then
+    COMMAND="dnf"
+else
+    COMMAND="yum"
+fi
+
 #----------------------------------------
 # root かどうかをチェック
 #----------------------------------------
@@ -100,12 +109,12 @@
 
 	    if test "x$ins" = "x"; then
 		echo "Now installing: " $p
-		yum install $p
+		$COMMAND install $p
 		echo "done."
 		echo ""
 	    else  
 		if echo "$ins" |grep -q '0.4.2-0' ; then
-			yum install $p
+			$COMMAND install $p
 			echo "done." 
 			echo ""
 	       else 
@@ -134,7 +143,7 @@
 uninstall_packages () {
     for p in $*; do
 	echo "Now uninstalling: " $p
-	yum erase $p
+	$COMMAND erase $p
 	echo "done."
 	echo ""
     done



More information about the openrtm-commit mailing list