Skip to content

Commit d22e97d

Browse files
committed
fix package detection error
1 parent 7ce8e51 commit d22e97d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ fi;
1717
#Check Dependencies
1818
PACKAGE_Error=0
1919
for package in "u-boot-tools" "bc" "make" "gcc" "libc6-dev" "libncurses5-dev" "libssl-dev" "fakeroot"; do
20-
if [[ -z "$(dpkg -l |grep ${package})" ]];then echo "please install ${package}";PACKAGE_Error=1;fi
20+
TESTPKG=$(dpkg -l |grep "\s${package}")
21+
if [[ -z "${TESTPKG}" ]];then echo "please install ${package}";PACKAGE_Error=1;fi
2122
done
2223
if [ ${PACKAGE_Error} == 1 ]; then exit 1; fi
2324

0 commit comments

Comments
 (0)