[Groonga-mysql-commit] mroonga/mroonga at 19b8d85 [master] package rpm: simplify

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Dec 16 22:57:06 JST 2015


Kouhei Sutou	2015-12-16 22:57:06 +0900 (Wed, 16 Dec 2015)

  New Revision: 19b8d85f1e143654c3cde8e4729f4341490809b1
  https://github.com/mroonga/mroonga/commit/19b8d85f1e143654c3cde8e4729f4341490809b1

  Message:
    package rpm: simplify

  Modified files:
    packages/rpm/centos/mysql55-mroonga.spec.in
    packages/rpm/centos/mysql56-community-mroonga.spec.in
    packages/rpm/centos/percona-server-56-mroonga.spec.in

  Modified: packages/rpm/centos/mysql55-mroonga.spec.in (+4 -4)
===================================================================
--- packages/rpm/centos/mysql55-mroonga.spec.in    2015-12-16 22:55:00 +0900 (e02fba1)
+++ packages/rpm/centos/mysql55-mroonga.spec.in    2015-12-16 22:57:06 +0900 (e427a5c)
@@ -97,10 +97,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 mysql_command=`scl enable mysql55 'which mysql'`
-password_option=""
-$mysql_command -u root -e "quit" > /dev/null 2>&1
-if [ $? -ne 0 ]; then
-    password_option="-p"
+if $mysql_command -u root -e "quit" > /dev/null 2>&1; then
+  password_option=""
+else
+  password_option="-p"
 fi
 current_version=0
 version=`echo %{groonga_required_version} | sed -e 's/\.//g'`

  Modified: packages/rpm/centos/mysql56-community-mroonga.spec.in (+4 -4)
===================================================================
--- packages/rpm/centos/mysql56-community-mroonga.spec.in    2015-12-16 22:55:00 +0900 (32f6ce7)
+++ packages/rpm/centos/mysql56-community-mroonga.spec.in    2015-12-16 22:57:06 +0900 (09385fe)
@@ -103,10 +103,10 @@ else
 fi
 
 mysql_command=`which mysql`
-password_option=""
-$mysql_command -u root -e "quit" > /dev/null 2>&1
-if [ $? -ne 0 ]; then
-    password_option="-p"
+if $mysql_command -u root -e "quit" > /dev/null 2>&1; then
+  password_option=""
+else
+  password_option="-p"
 fi
 current_version=0
 version=`echo %{groonga_required_version} | sed -e 's/\.//g'`

  Modified: packages/rpm/centos/percona-server-56-mroonga.spec.in (+5 -3)
===================================================================
--- packages/rpm/centos/percona-server-56-mroonga.spec.in    2015-12-16 22:55:00 +0900 (4ee9f22)
+++ packages/rpm/centos/percona-server-56-mroonga.spec.in    2015-12-16 22:57:06 +0900 (3750585)
@@ -97,9 +97,11 @@ fi
 
 mysql_command=`which mysql`
 password_option=""
-$mysql_command -u root -e "quit" > /dev/null 2>&1
-if [ $? -ne 0 ]; then
-    password_option="-p"
+
+if $mysql_command -u root -e "quit" > /dev/null 2>&1; then
+  password_option=""
+else
+  password_option="-p"
 fi
 current_version=0
 version=`echo %{groonga_required_version} | sed -e 's/\.//g'`
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-mysql-commit mailing list
Back to archive index