1 Star 3 Fork 0

Rick/tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install-zh.sh 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
ARCH=$(uname -m)
if [ ${ARCH} == 'x86_64' ]; then
ARCH=amd64
elif [ ${ARCH} == 'armv6l' ]; then
ARCH=arm6
elif [ ${ARCH} == 'armv7l' ]; then
ARCH=arm7
elif [ ${ARCH} == 'arm64' ]; then
ARCH=arm64
else
echo "do not support ${ARCH}"
echo "please feel free to help improve this at https://github.com/LinuxSuRen/tools/blob/master/install.sh"
exit 1
fi
OS=$(uname -s)
if [ ${OS} == 'Darwin' ]; then
OS=darwin
elif [ ${OS} == 'Linux' ]; then
OS=linux
else
echo "do not support ${OS}"
echo "please feel free to help improve this at https://github.com/LinuxSuRen/tools/blob/master/install.sh"
exit 2
fi
address=https://gh-proxy.com/https://github.com/linuxsuren/http-downloader/releases/latest/download/hd-${OS}-${ARCH}.tar.gz
if [ -x "$(command -v curl)" ]; then
curl -L $address | tar xzv hd
elif [ -x "$(command -v wget)" ]; then
wget $address -O - | tar xzv hd
else
echo "curl or wget is required to download hd."
exit 3
fi
if ($(./hd version> /dev/null 2> /dev/null)); then
sudo install hd /usr/bin/hd
hd completion
hd setup --proxy ghproxy.com --provider gitee
hd fetch --reset
echo "config the proxy with command: hd setup"
else
echo "hd was not downloaded successfully."
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linuxsuren/tools.git
git@gitee.com:linuxsuren/tools.git
linuxsuren
tools
tools
master

搜索帮助