setup-efi-ivi: use -u shell option
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 26 Jun 2013 10:08:43 +0000 (13:08 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 26 Jun 2013 10:15:52 +0000 (13:15 +0300)
It is a good practice to use the -u shell option because it helps writing
cleaner and more secure scripts. Start using it.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
setup-efi-ivi

index ad5adf8..f2d3bad 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -ef
+#!/bin/sh -efu
 
 # Copyright 2013 Intel Corporation
 # Author: Artem Bityutskiy
@@ -14,8 +14,8 @@ fatal()
 }
 
 # Make sure the installer framework variables are defined
-[ "x$INSTALLERFW_INSTALLER_NAME" != "x" ] ||
-       fatal "installer framework environment variables not found"
+[ "${INSTALLERFW_INSTALLER_NAME:+x}" == "x" ] ||
+       fatal "installer framework environment variables not found"
 
 # Find the root and boot paritions
 pnum=0