admin管理员组

文章数量:1558087

程序员是懒出来的。。。

#!/bin/bash  
#installApks.sh
echo '============= start install apk ============='
apkDir=$1
dev=$2
path=""
subDir=""
cd $apkDir
function readDir(){
        cd $apkDir
        filelist=`ls $1`
        for file in $filelist
        do
                # echo $file
                installApk $file
        done
}
function installApk(){
        file=$1
        extension="${file##*.}"
        if [ "$extension" = "apk" ]
        then
                echo "install "$file" ..."
                echo "bmc_adb -s $dev install $file"
                bmc_adb -s $dev  install $file
        else
                echo "Error:"$file "is not apk file."
        fp
}
readDir $apkDir


指定apk包目录的路径。
指定的设备名称。

本文标签: 一键批量脚本手机Shell