diff options
author | Li Zhijian <lizhijian@cn.fujitsu.com> | 2017-10-17 11:03:24 +0800 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2017-10-18 11:53:00 -0700 |
commit | c9a74a0a021452bb72f2354608bc1f130d07e908 (patch) | |
tree | a64ebc4f8920ee32e0969aa20f83bdf96246dcd9 | |
parent | 89f2e5b56cb57933dfb7d6f49d73935e38d556ba (diff) |
functions: correct get_os logic
at commit aea49c3: functions: Fix logic for get_os() function
To determine which OS the scripts are running on, check if the
build.prop file exists instead of using the lsb_release command.
If it does, then the scripts are running on Android; otherwise
it's Ubuntu.
From the changelog, we can know get_os() expect to return 2(means android) if
build.prop file exists, but the code does not do that previouslly
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
-rw-r--r-- | include/functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.sh b/include/functions.sh index 10b8de8..0105776 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -425,7 +425,7 @@ sigtrap() { get_os() { build_prop_file="\system\build.prop" - if [ -e "$build_prop_file" ]; then + if [ ! -e "$build_prop_file" ]; then # for ubuntu return 1 else |