Skip to content

Commit

Permalink
adjust update sources
Browse files Browse the repository at this point in the history
  • Loading branch information
licyk committed Dec 22, 2024
1 parent 0aa1d28 commit 23925ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions modules/get_modelscope_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ get_modelscope_model() {
term_sd_echo "modelscope_model_branch: ${modelscope_model_branch}"
term_sd_echo "modelscope_model_path: ${modelscope_model_path}"
term_sd_echo "ARIA2_MULTI_THREAD: ${ARIA2_MULTI_THREAD}"
term_sd_echo "cmd: aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x ${ARIA2_MULTI_THREAD} ${url} -d ${path} -o ${name}"
term_sd_echo "cmd: aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x ${ARIA2_MULTI_THREAD} -k 1M ${url} -d ${path} -o ${name}"
fi

if [[ ! -f "${file_path}" ]]; then
term_sd_echo "下载 ${name} 中, 路径: ${file_path}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" "${url}" -d "${path}" -o "${name}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" -k 1M "${url}" -d "${path}" -o "${name}"
else
if [[ -f "${aria2_tmp_path}" ]]; then
term_sd_echo "恢复下载 ${name} 中, 路径: ${file_path}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" "${url}" -d "${path}" -o "${name}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" -k 1M "${url}" -d "${path}" -o "${name}"
else
term_sd_echo "${name} 文件已存在, 路径: ${file_path}"
fi
Expand Down
6 changes: 3 additions & 3 deletions modules/term_sd_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ aria2_download() {
term_sd_echo "aria2_tmp_path: ${aria2_tmp_path}"
term_sd_echo "file_path: ${file_path}"
term_sd_echo "ARIA2_MULTI_THREAD: ${ARIA2_MULTI_THREAD}"
term_sd_echo "cmd: aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x ${ARIA2_MULTI_THREAD} ${url} -d ${path} -o ${name}"
term_sd_echo "cmd: aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x ${ARIA2_MULTI_THREAD} -k 1M ${url} -d ${path} -o ${name}"
fi

if [[ ! -f "${file_path}" ]]; then
term_sd_echo "下载 ${name} 中, 路径: ${file_path}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" "${url}" -d "${path}" -o "${name}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" -k 1M "${url}" -d "${path}" -o "${name}"
if [[ "$?" == 0 ]]; then
term_sd_echo "${name} 下载成功"
else
Expand All @@ -277,7 +277,7 @@ aria2_download() {
else
if [[ -f "${aria2_tmp_path}" ]]; then
term_sd_echo "恢复下载 ${name} 中, 路径: ${file_path}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" "${url}" -d "${path}" -o "${name}"
term_sd_try aria2c --file-allocation=none --summary-interval=0 --console-log-level=error -s 64 -c -x "${ARIA2_MULTI_THREAD}" -k 1M "${url}" -d "${path}" -o "${name}"
if [[ "$?" == 0 ]]; then
term_sd_echo "${name} 下载成功"
else
Expand Down
12 changes: 6 additions & 6 deletions modules/term_sd_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ term_sd_remote_revise() {
$(get_dialog_size_menu) \
"0" "> 返回" \
"1" "> Github 源" \
"2" "> Gitlab" \
"3" "> Gitee" \
"4" "> Bitbucket" \
"2" "> Gitee" \
"3" "> Bitbucket" \
"4" "> Gitlab" \
3>&1 1>&2 2>&3)

case "${dialog_arg}" in
Expand All @@ -128,7 +128,7 @@ term_sd_remote_revise() {
$(get_dialog_size)
;;
2)
git -C "${START_PATH}/term-sd" remote set-url origin "https://gitlab.com/licyk/term-sd"
git -C "${START_PATH}/term-sd" remote set-url origin "https://gitee.com/licyk/term-sd"
dialog --erase-on-exit \
--title "Term-SD" \
--backtitle "Term-SD 更新源切换选项" \
Expand All @@ -137,7 +137,7 @@ term_sd_remote_revise() {
$(get_dialog_size)
;;
3)
git -C "${START_PATH}/term-sd" remote set-url origin "https://gitee.com/licyk/term-sd"
git -C "${START_PATH}/term-sd" remote set-url origin "https://[email protected]/licyks/term-sd"
dialog --erase-on-exit \
--title "Term-SD" \
--backtitle "Term-SD 更新源切换选项" \
Expand All @@ -146,7 +146,7 @@ term_sd_remote_revise() {
$(get_dialog_size)
;;
4)
git -C "${START_PATH}/term-sd" remote set-url origin "https://[email protected]/licyks/term-sd"
git -C "${START_PATH}/term-sd" remote set-url origin "https://gitlab.com/licyk/term-sd"
dialog --erase-on-exit \
--title "Term-SD" \
--backtitle "Term-SD 更新源切换选项" \
Expand Down
2 changes: 1 addition & 1 deletion term-sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ term_sd_reinstall() {
term_sd_clone_modules() {
local i
local count=0
local repo_urls="https://github.com/licyk/term-sd https://gitlab.com/licyk/term-sd https://[email protected]/licyks/term-sd https://gitee.com/licyk/term-sd"
local repo_urls="https://github.com/licyk/term-sd https://gitee.com/licyk/term-sd https://[email protected]/licyks/term-sd https://gitlab.com/licyk/term-sd"

term_sd_echo "下载 Term-SD 中"
for i in ${repo_urls}; do
Expand Down

0 comments on commit 23925ab

Please sign in to comment.