代码拉取完成,页面将自动刷新
#!/bin/sh
echo start update qqwry data at`date`
tem_file="qqwry_tem.dat"
lastest_data=`pwd`/qqwry_lastest.dat
lastest_md5=""
if [ -f "${lastest_data}" ]; then
echo old data exist!
lastest_md5=`md5sum ${lastest_data}|cut -d " " -f 1`
fi
echo old data md5 is ${lastest_md5}
#python3 update_chunzhen.py ${tem_file}
sh ./get_chunzhen.sh ${tem_file}
tem_md5=""
if [ -f "${tem_file}" ];then
tem_md5=`md5sum ${tem_file}|cut -d " " -f 1`
fi
echo download file md5 is ${tem_md5}
if [ "${lastest_md5}" = "${tem_md5}" ];then
echo same file, no need update anything!
rm -f ${tem_file}
exit 0
fi
# copy data to date dir
echo copy date to date dir
date_dir="historys/`date "+%Y_%m_%d"`"
echo ${date_dir}
mkdir historys
mkdir ${date_dir}
# copy tem file
cp ${tem_file} ${lastest_data}
cp ${tem_file} ${date_dir}/qqwry.dat
rm -f ${tem_file}
echo finish everything
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。