From a3819b34179623cf6052bd9aedf91ecc3258830f Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 14 Feb 2014 18:20:03 +0200 Subject: [PATCH] installerfw-sh-functions: do not omit the last line When we are restoring the installer-framework environment in the 'installerfw_restore_env()', we read the '/etc/installerfw-environment' file line-by line, and export variables. However, if the last line does not contain the newline character, we ignore it. So we miss the last variable and do not export it. This patch fixes the problem, which also fixes TIVI-2652. Change-Id: I47f560e32a6951b492b0e430a769c4dfc29e5cb5 Signed-off-by: Artem Bityutskiy --- installerfw-sh-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installerfw-sh-functions b/installerfw-sh-functions index 491e072..bee4a19 100644 --- a/installerfw-sh-functions +++ b/installerfw-sh-functions @@ -101,7 +101,7 @@ installerfw_restore_env() "installer framework environment: can't find" \ "\"$file\"" - while IFS= read -r line; do + while IFS= read -r line || [ -n "$line" ]; do eval "export $line" done < "$file" -- 2.7.4