Make the code slightly easier to read
authorAndrew Ruthven <andrew@etc.gen.nz>
Fri, 11 Jan 2019 12:06:15 +0000 (01:06 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Fri, 11 Jan 2019 12:06:15 +0000 (01:06 +1300)
debian/postinst

index 2ae2bc9..28a8c3b 100644 (file)
@@ -25,22 +25,13 @@ case "$1" in
     db_get $PACKAGE/enable
     UPDATE_MOTD="${RET:-true}"
 
-    if [ $UPDATE_MOTD = 'true' ]
-    then
-      UPDATE_MOTD='yes'
-    fi
+    [ $UPDATE_MOTD = 'true' ] && UPDATE_MOTD='yes'
 
     # Support the old variable name.
-    if [ "x$RUN" != "x" ]
-    then
-      UPDATE_MOTD=$RUN
-    fi
+    [ "x$RUN" != "x" ] && UPDATE_MOTD=$RUN
 
     # Support the old variable name.
-    if [ "x$ARGS" != "x" ]
-    then
-      UPDATE_MOTD_ARGS=$ARGS
-    fi
+    [ "x$ARGS" != "x" ] && UPDATE_MOTD_ARGS=$ARGS
 
     db_get $PACKAGE/email
     EMAIL="${RET:-none}"