代码拉取完成,页面将自动刷新
#!/usr/bin/env bash
deviceId=$1
host='http://agile.meiliworks.com/data_mgr/save/dashboard'
if [ $# != 1 ]; then
echo "sh time.sh deviceId"
exit 1;
fi
currentDir=$(cd "$(dirname "$0")"; pwd)
sh ${currentDir}/src/main/resources/apk-install-time.sh $deviceId
sh ${currentDir}/src/main/resources/apk-launcher-time.sh $deviceId
installTimeFile=${currentDir}/src/main/resources/install-time.txt
launcherTimeFile=${currentDir}/src/main/resources/launcher-time.txt
installTime=`cat ${installTimeFile}`
welcomeTime=`sed -n 1p ${launcherTimeFile}`
mainTime=`sed -n 2p ${launcherTimeFile}`
welcomeTime=`echo "scale=3; ${welcomeTime}/1000" | bc`
mainTime=`echo "scale=3; ${mainTime}/1000" | bc`
#如果小于1秒钟
startChar=`echo ${welcomeTime:0:1}`
echo $startChar
if [ "${startChar}" == "." ]; then
welcomeTime="0"${welcomeTime}
fi
startChar=`echo ${mainTime:0:1}`
if [ "${startChar}" == "." ]; then
mainTime="0"${mainTime}
fi
echo "install Time "${installTime}
echo "welcome "${welcomeTime}
echo "mainTime "${mainTime}
timestamp=`date "+%s"`
curl -X POST $host -d '{"env":"MOB", "type": "TIME", "runStartTime":"'${timestamp}'", "runEndTime":"'${timestamp}'", "data":{"install_time":'${installTime}',"welcome_time":'${welcomeTime}',"main_time":'${mainTime}'}}'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。