Skip to content

Commit

Permalink
add push_third_party script
Browse files Browse the repository at this point in the history
  • Loading branch information
jianfeifeng committed Jun 18, 2020
1 parent 05ac179 commit 75b0aaf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Binary file removed scripts/.DS_Store
Binary file not shown.
37 changes: 37 additions & 0 deletions scripts/push_third_party.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

script_name=$0
script_abs=$(readlink -f "$0")
script_dir=$(dirname $script_abs)

host_lib_dir=""
device=""
device_dir=""

TEMP=`getopt -o l:d:p: --long lib:device:path \
-n ${script_name} -- "$@"`
if [ $? != 0 ] ; then echo "[ERROR] terminating..." >&2 ; exit 1 ; fi
eval set -- "$TEMP"
while true ; do
case "$1" in
-l|--lib)
host_lib_dir=$2
echo "[INFO] use library in ${host_lib_dir}" ;
shift 2 ;;
-d|--device)
device=$2
echo "[INFO] test on device ${device}" ;
shift 2 ;;
-p|--path)
device_dir=$2
echo "[INFO] test on device directory ${device_dir}" ;
shift 2 ;;
--) shift ;
break ;;
*) echo "[ERROR] $1" ; exit 1 ;;
esac
done

adb -s ${device} push ${host_lib_dir}/protobuf/lib/libprotobuf.so.11 ${device_dir} || exit 1
adb -s ${device} push ${host_lib_dir}/opencl/lib64 ${device_dir} || exit 1
adb -s ${device} push ${host_lib_dir}/jpeg/lib/libjpeg.so.9 ${device_dir} || exit 1

0 comments on commit 75b0aaf

Please sign in to comment.