mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复订阅下载 http 协议文件
This commit is contained in:
parent
819b15b15e
commit
970dff144c
|
@ -152,19 +152,28 @@ update_raw() {
|
|||
local autoAddCron="$3"
|
||||
local autoDelCron="$4"
|
||||
|
||||
if [[ ! $autoAddCron ]];then
|
||||
if [[ ! $autoAddCron ]]; then
|
||||
autoAddCron=${AutoAddCron}
|
||||
fi
|
||||
if [[ ! $autoDelCron ]];then
|
||||
if [[ ! $autoDelCron ]]; then
|
||||
autoDelCron=${AutoDelCron}
|
||||
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 suffix="${raw_url##*.}"
|
||||
local raw_file_name="${uniq_path}.${suffix}"
|
||||
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
|
||||
mv "$dir_raw/${raw_file_name}.new" "$dir_raw/${raw_file_name}"
|
||||
|
@ -297,11 +306,11 @@ diff_scripts() {
|
|||
local extensions="$6"
|
||||
local autoAddCron="$7"
|
||||
local autoDelCron="$8"
|
||||
|
||||
if [[ ! $autoAddCron ]];then
|
||||
|
||||
if [[ ! $autoAddCron ]]; then
|
||||
autoAddCron=${AutoAddCron}
|
||||
fi
|
||||
if [[ ! $autoDelCron ]];then
|
||||
if [[ ! $autoDelCron ]]; then
|
||||
autoDelCron=${AutoDelCron}
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user