Update scripts

This commit is contained in:
John Zhao 2018-03-23 12:05:17 +08:00
parent 7e8218607c
commit 4a4aef4581
2 changed files with 8 additions and 1 deletions

View File

@ -92,6 +92,8 @@ clean:
@$(call rm,./_build/) @$(call rm,./_build/)
@$(call rm,./_output/) @$(call rm,./_output/)
@$(call rm,./_install/) @$(call rm,./_install/)
@$(call rm,./samples/_build/)
@$(call rm,./samples/_output/)
@$(MAKE) cleanlog @$(MAKE) cleanlog
cleanall: clean cleanall: clean

View File

@ -18,7 +18,11 @@ fi
_detect curl _detect curl
_detect $PYTHON _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() { _detect_install() {
brew ls --versions "$1" > /dev/null brew ls --versions "$1" > /dev/null
} }
@ -58,6 +62,7 @@ if [ "$HOST_OS" = "Linux" ]; then
_detect apt-get _detect apt-get
# apt-get install # apt-get install
_install_deps "sudo apt-get install" build-essential cmake git clang-format _install_deps "sudo apt-get install" build-essential cmake git clang-format
_install_deps "sudo apt-get install" libv4l-dev
# sudo # sudo
SUDO="sudo" SUDO="sudo"
elif [ "$HOST_OS" = "Mac" ]; then elif [ "$HOST_OS" = "Mac" ]; then