packaging: Fix bashism mistakes in scriptlets 36/121336/1
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 27 Mar 2017 16:55:44 +0000 (18:55 +0200)
committerPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 27 Mar 2017 16:59:36 +0000 (18:59 +0200)
Space is missing before closing bracket,
so error is observed (on Tizen:IVI):

  ( 31/162) Removing email-service-0.10.103-23.72 [done]
  Additional rpm output:
  /var/tmp/rpm-tmp.0voxr9: line 1: [: missing `]'

Also it's prefered to put constants before variable in comparaisons,
(BTW '!=' or '=' not '==')

Change-Id: I728cc88cb023fc843a8807eca50da8cab73bb16a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
packaging/email-service.spec

index 5c14cc37ef712b53ed0d9fec894f8c021f8f4e57..8388dcd18b503a080744d73b92acf7be2920d655 100755 (executable)
@@ -135,12 +135,12 @@ chgrp %TZ_SYS_USER_GROUP %{_bindir}/email-service_init_db.sh
 chsmack -a "User" %{TZ_SYS_DATA}/email/res/email-service.sql
 
 systemctl daemon-reload
-if [ $1 == 1 ]; then
+if [ 1 = $1 ]; then
     systemctl restart email.service
 fi
 
 %preun
-if [ $1 == 0]; then
+if [ 0 = $1 ]; then
     systemctl stop email.service
 fi