#!/bin/sh
echo 等待您插入手机...
adb wait-for-device
ApplicationPackages=(
com.qianmi.d2p.app.AXXX1
com.qianmi.d2p.app.AXXX2
)
#检查是否已经安装,如果安装先删除
for data in ${ApplicationPackages[@]}
do
echo 开始卸载:${data}
adb uninstall ${data}
done
#删除本地的安装包
rm -rf ./A*.apk
#下载安装包
url=(
http://pic.qianmi.com/d2papp/AXXX1/latest-release.apk
http://pic.qianmi.com/d2papp/AXXX2/latest-release.apk
)
for data in ${url[@]}
do
#截取ID
s=${data##*d2papp/}
id=${s%/*}
echo 正在下载安装包
wget -O ${id}.apk -c ${data}
done
#安装已下载的包
for file in ./A*.apk
do
echo 正在执行安装:${file}
adb install ${file}
done
网友评论