From 4a4aef4581e30f1832ac884ba6a4843866ff75f5 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Fri, 23 Mar 2018 12:05:17 +0800 Subject: [PATCH] Update scripts --- Makefile | 2 ++ scripts/init.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ac815df..0353909 100644 --- a/Makefile +++ b/Makefile @@ -92,6 +92,8 @@ clean: @$(call rm,./_build/) @$(call rm,./_output/) @$(call rm,./_install/) + @$(call rm,./samples/_build/) + @$(call rm,./samples/_output/) @$(MAKE) cleanlog cleanall: clean diff --git a/scripts/init.sh b/scripts/init.sh index 9a77142..a61136d 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -18,7 +18,11 @@ fi _detect curl _detect $PYTHON -if [ "$HOST_OS" = "Mac" ]; then +if [ "$HOST_OS" = "Linux" ]; then + _detect_install() { + dpkg -s "$1" > /dev/null + } +elif [ "$HOST_OS" = "Mac" ]; then _detect_install() { brew ls --versions "$1" > /dev/null } @@ -58,6 +62,7 @@ if [ "$HOST_OS" = "Linux" ]; then _detect apt-get # apt-get install _install_deps "sudo apt-get install" build-essential cmake git clang-format + _install_deps "sudo apt-get install" libv4l-dev # sudo SUDO="sudo" elif [ "$HOST_OS" = "Mac" ]; then