push2android.sh 885 字节
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/*"
L
liuruilong 已提交
8 9 10 11 12 13 14 15 16
EXE_DIR="data/local/tmp/bin"
adb shell mkdir ${EXE_DIR}
MODELS_DIR="data/local/tmp/models"
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

L
liuruilong 已提交
22 23
IMAGES_DIR="data/local/tmp/images"
adb shell mkdir ${IMAGES_DIR}
L
liuruilong 已提交
24
LIB_PATH="../../build/release/arm-v7a/build/*"
L
liuruilong 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37
adb push ${EXE_FILE} ${EXE_DIR}
adb push ${LIB_PATH} ${EXE_DIR}
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