push2android.sh 905 字节
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
EXE_DIR="data/local/tmp/bin"
adb shell mkdir ${EXE_DIR}
Y
yangfei 已提交
10
MODELS_DIR="/data/local/tmp"
L
liuruilong 已提交
11 12
adb shell mkdir ${MODELS_DIR}
for file in `ls ${MODELS_SRC}`
Y
yangfei 已提交
13
do
L
liuruilong 已提交
14 15 16
    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

Y
yangfei 已提交
22
IMAGES_DIR="/data/local/tmp"
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}
Y
yangfei 已提交
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