mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-08 04:16:07 +08:00
修复订阅下载 http 协议文件
This commit is contained in:
parent
819b15b15e
commit
970dff144c
|
@ -152,19 +152,28 @@ update_raw() {
|
||||||
local autoAddCron="$3"
|
local autoAddCron="$3"
|
||||||
local autoDelCron="$4"
|
local autoDelCron="$4"
|
||||||
|
|
||||||
if [[ ! $autoAddCron ]];then
|
if [[ ! $autoAddCron ]]; then
|
||||||
autoAddCron=${AutoAddCron}
|
autoAddCron=${AutoAddCron}
|
||||||
fi
|
fi
|
||||||
if [[ ! $autoDelCron ]];then
|
if [[ ! $autoDelCron ]]; then
|
||||||
autoDelCron=${AutoDelCron}
|
autoDelCron=${AutoDelCron}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local proxyStr=""
|
||||||
|
if [[ $proxy ]]; then
|
||||||
|
if [[ $url == http:* ]]; then
|
||||||
|
proxyStr="-e \"http_proxy=${proxy}\""
|
||||||
|
elif [[ $url == https:* ]]; then
|
||||||
|
proxyStr="-e \"http_proxy=${proxy};https_proxy=${proxy}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
local raw_url="$url"
|
local raw_url="$url"
|
||||||
local suffix="${raw_url##*.}"
|
local suffix="${raw_url##*.}"
|
||||||
local raw_file_name="${uniq_path}.${suffix}"
|
local raw_file_name="${uniq_path}.${suffix}"
|
||||||
echo -e "开始下载:${raw_url} \n\n保存路径:$dir_raw/${raw_file_name}\n"
|
echo -e "开始下载:${raw_url} \n\n保存路径:$dir_raw/${raw_file_name}\n"
|
||||||
|
|
||||||
wget -q --no-check-certificate -e "http_proxy=${proxy};https_proxy=${proxy}" -O "$dir_raw/${raw_file_name}.new" ${raw_url}
|
wget -q --no-check-certificate $proxyStr -O "$dir_raw/${raw_file_name}.new" ${raw_url}
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
mv "$dir_raw/${raw_file_name}.new" "$dir_raw/${raw_file_name}"
|
mv "$dir_raw/${raw_file_name}.new" "$dir_raw/${raw_file_name}"
|
||||||
|
@ -298,10 +307,10 @@ diff_scripts() {
|
||||||
local autoAddCron="$7"
|
local autoAddCron="$7"
|
||||||
local autoDelCron="$8"
|
local autoDelCron="$8"
|
||||||
|
|
||||||
if [[ ! $autoAddCron ]];then
|
if [[ ! $autoAddCron ]]; then
|
||||||
autoAddCron=${AutoAddCron}
|
autoAddCron=${AutoAddCron}
|
||||||
fi
|
fi
|
||||||
if [[ ! $autoDelCron ]];then
|
if [[ ! $autoDelCron ]]; then
|
||||||
autoDelCron=${AutoDelCron}
|
autoDelCron=${AutoDelCron}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user