MYNT-EYE-S-SDK/scripts/init.sh

53 lines
1.4 KiB
Bash
Raw Normal View History

2018-03-09 05:42:45 +02:00
#!/usr/bin/env bash
2018-05-10 09:46:34 +03:00
# Copyright 2018 Slightech Co., Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
2018-03-09 05:42:45 +02:00
# _VERBOSE_=1
2018-11-16 10:30:13 +02:00
# _INIT_LINTER_=1
2018-12-20 03:13:57 +02:00
# _INIT_COMMITIZEN_=1
2018-03-09 04:51:09 +02:00
# _FORCE_INSRALL_=1
2018-11-16 10:30:13 +02:00
_INSTALL_OPTIONS_=$@
2018-03-09 04:51:09 +02:00
BASE_DIR=$(cd "$(dirname "$0")" && pwd)
2018-11-16 10:30:13 +02:00
source "$BASE_DIR/init_tools.sh"
2018-03-09 04:51:09 +02:00
## deps
_echo_s "Init deps"
if [ "$HOST_OS" = "Linux" ]; then
2018-11-16 10:30:13 +02:00
_install_deps "$SUDO apt-get install" libv4l-dev
2018-03-09 04:51:09 +02:00
elif [ "$HOST_OS" = "Mac" ]; then
2018-03-22 06:57:35 +02:00
_install_deps "brew install" libuvc
2018-03-09 08:11:46 +02:00
elif [ "$HOST_OS" = "Win" ]; then
2018-11-16 10:30:13 +02:00
# _install_deps "pacman -S" ?
_echo
2018-03-09 04:51:09 +02:00
else # unexpected
_echo_e "Unknown host os :("
exit 1
fi
2018-04-18 07:14:20 +03:00
## cmake version
_echo_s "Expect cmake version >= 3.0"
cmake --version | head -1
2018-05-03 09:21:28 +03:00
if [ "$HOST_NAME" = "Ubuntu" ]; then
# sudo apt remove cmake
_echo "How to upgrade cmake in Ubuntu"
_echo " https://askubuntu.com/questions/829310/how-to-upgrade-cmake-in-ubuntu"
fi
2018-04-18 07:14:20 +03:00
2018-03-09 04:51:09 +02:00
exit 0