mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-07 10:44:04 +08:00
<fix>: fix bash installer bug.
This commit is contained in:
parent
787b27c36d
commit
f60ab545da
@ -26,6 +26,7 @@ tmp_created_install_dir=""
|
|||||||
userOpt_version="pre"
|
userOpt_version="pre"
|
||||||
userOpt_help=0
|
userOpt_help=0
|
||||||
userOpt_lang="zh"
|
userOpt_lang="zh"
|
||||||
|
version_prefix="v"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -166,6 +167,11 @@ install() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# version 版本不是 'pre',添加'v'前缀
|
||||||
|
if [[ "$userOpt_version" =~ ^(0\.([1-9])\.([0-9]))$ ]]; then
|
||||||
|
userOpt_version="${version_prefix}${userOpt_version}"
|
||||||
|
fi
|
||||||
|
|
||||||
url="https://gitee.com/RubyMetric/chsrc/releases/download/${userOpt_version}/${binary_name}-${arch}-${platform}"
|
url="https://gitee.com/RubyMetric/chsrc/releases/download/${userOpt_version}/${binary_name}-${arch}-${platform}"
|
||||||
|
|
||||||
path_to_executable="${userOpt_install_dir}/${binary_name}"
|
path_to_executable="${userOpt_install_dir}/${binary_name}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user