From: Artem Bityutskiy Date: Fri, 14 Feb 2014 16:20:03 +0000 (+0200) Subject: installerfw-sh-functions: do not omit the last line X-Git-Tag: accepted/tizen/ivi/20140218.215959~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3819b34179623cf6052bd9aedf91ecc3258830f;p=profile%2Fivi%2Fsetup-ivi.git 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 --- 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"