-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp_files_ros.sh
executable file
·53 lines (45 loc) · 1.64 KB
/
cp_files_ros.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# Copyright 2020 Indemind 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.
BASE_DIR=$(cd "$(dirname "$0")" && pwd)
WRAPPER_OUTPUT_DIR=$BASE_DIR/../../../devel/lib/imsee_ros_wrapper
DRIVER_BASE_DIR=$BASE_DIR/driver/lib
MNN_CONFIG_DIR=$BASE_DIR/detector/config
MNN_LIB_BASE_DIR=$BASE_DIR/detector/lib
# check host arch
HOST_ARCH=$(uname -m)
# echo "Host arch is $HOST_ARCH"
# if [ "$HOST_ARCH" = "x86_64" ]; then
# DRIVER_DIR=$DRIVER_BASE_DIR/x86-64
# MNN_LIB_DIR=$MNN_LIB_BASE_DIR/x86-64
# elif [ "$HOST_ARCH" = "aarch64" ]; then
# DRIVER_DIR=$DRIVER_BASE_DIR/aarch64
# MNN_LIB_DIR=$MNN_LIB_BASE_DIR/aarch64
# else
# echo "Unknown host arch :("
# exit 1
# fi
# creat link
# if [ ! -f "$WRAPPER_OUTPUT_DIR/libusbdriver.so" ]; then
# ln -s $DRIVER_DIR/libusbdriver.so $WRAPPER_OUTPUT_DIR
# echo "Finish cp libusbdriver.so!"
# fi
if [ ! -f "$WRAPPER_OUTPUT_DIR/libMNN.so" ]; then
ln -s $MNN_LIB_DIR/libMNN.so $WRAPPER_OUTPUT_DIR
echo "Finish cp libMNN.so!"
fi
if [ ! -f "$WRAPPER_OUTPUT_DIR/blazeface.mnn" ]; then
ln -s $MNN_CONFIG_DIR/blazeface.mnn $WRAPPER_OUTPUT_DIR
echo "Finish cp blazeface.mnn!"
fi