代码拉取完成,页面将自动刷新
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=selective_search_data.tgz
URL=https://dl.dropboxusercontent.com/s/orrt7o6bp6ae0tc/selective_search_data.tgz?dl=0
CHECKSUM=7078c1db87a7851b31966b96774cd9b9
if [ -f $FILE ]; then
echo "File already exists. Checking md5..."
os=`uname -s`
if [ "$os" = "Linux" ]; then
checksum=`md5sum $FILE | awk '{ print $1 }'`
elif [ "$os" = "Darwin" ]; then
checksum=`cat $FILE | md5`
fi
if [ "$checksum" = "$CHECKSUM" ]; then
echo "Checksum is correct. No need to download."
exit 0
else
echo "Checksum is incorrect. Need to download again."
fi
fi
echo "Downloading precomputed selective search boxes (0.5G)..."
wget $URL -O $FILE
echo "Unzipping..."
tar zxvf $FILE
echo "Done. Please run this command again to verify that checksum = $CHECKSUM."
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。