push2android.sh 921 字节
Newer Older
L
liuruilong 已提交
1 2 3
#!/usr/bin/env sh

push_fn () {
L
liuruilong 已提交
4 5 6 7
MODELS_PATH="../../test/models/*"
MODELS_SRC="../../test/models"
IMAGE_PATH="../../test/images/*"
EXE_FILE="../../test/build/*"
8
EXE_DIR="/data/local/tmp/bin"
L
liuruilong 已提交
9
adb shell mkdir ${EXE_DIR}
10
MODELS_DIR="/data/local/tmp/models"
L
liuruilong 已提交
11 12 13 14 15 16
adb shell mkdir ${MODELS_DIR}
for file in `ls ${MODELS_SRC}`
do 
    adb shell mkdir ${MODELS_DIR}"/"${file}
done

L
liuruilong 已提交
17 18 19 20 21
if [[ -d "../../src/operators/kernel/mali/ACL_Android/build" ]]; then
ACL_BUILD_PATH="../../src/operators/kernel/mali/ACL_Android/build/*"
adb push ${ACL_BUILD_PATH} ${EXE_DIR}
fi

22
IMAGES_DIR="/data/local/tmp/images"
L
liuruilong 已提交
23
adb shell mkdir ${IMAGES_DIR}
L
liuruilong 已提交
24
LIB_PATH="../../build/release/arm-v7a/build/*"
L
liuruilong 已提交
25
adb push ${EXE_FILE} ${EXE_DIR}
26 27 28 29 30
for file in ${LIB_PATH}
do
    adb push ${file} ${EXE_DIR}
done

L
liuruilong 已提交
31 32 33 34 35 36 37 38 39 40 41
if [[ $1 != "npm" ]]; then
adb push ${IMAGE_PATH} ${IMAGES_DIR}
adb push ${MODELS_PATH} ${MODELS_DIR}
fi
}

if [[ $1 == "npm" ]]; then
push_fn $1
else
push_fn
fi