update
This commit is contained in:
parent
8a90bbfd9c
commit
97943c400d
21
install-fastgithub.sh
Normal file → Executable file
21
install-fastgithub.sh
Normal file → Executable file
@ -7,6 +7,10 @@ get_github_latest_release() {
|
||||
grep '"tag_name":' | # Get tag line
|
||||
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
|
||||
}
|
||||
|
||||
export all_proxy=
|
||||
export http_proxy=
|
||||
export https_proxy=
|
||||
# 获取最新版本号
|
||||
tag_name=$(get_github_latest_release "dotnetcore/FastGithub")
|
||||
echo tag_name = $tag_name
|
||||
@ -15,21 +19,18 @@ url="https://gh.tj20.top/https://github.com/dotnetcore/FastGithub/releases/downl
|
||||
echo url = $url
|
||||
|
||||
sudo /usr/fastgithub_linux-x64/fastgithub stop
|
||||
rm -rfv /usr/fastgithub_linux-x64
|
||||
mkdir -p ~/bin
|
||||
wget --no-check-certificate --content-disposition $url -O -|busybox unzip -d /usr -
|
||||
sudo rm -rfv /usr/fastgithub_linux-x64
|
||||
wget --no-check-certificate --content-disposition $url -O -|sudo busybox unzip -d /usr/ -
|
||||
|
||||
# sudo chmod +x ~/bin/fastgithub_linux-x64/fastgithub
|
||||
sudo chmod go-w /usr/fastgithub_linux-x64
|
||||
sudo chmod a+x /usr/fastgithub_linux-x64/fastgithub
|
||||
sudo /usr/fastgithub_linux-x64/fastgithub start
|
||||
|
||||
# 公用
|
||||
sed -i '/^.*fastgithub.*$/d' ~/.zshrc
|
||||
sed -i '/^\s*export\s\s*all_proxy.*$/d' ~/.zshrc
|
||||
sed -i '/^\s*export\s\s*http[s]_proxy.*$/d' ~/.zshrc
|
||||
sed -i '/^\s*export\s\s*http(s)?_proxy.*$/d' ~/.zshrc
|
||||
|
||||
cat << EOF >> ~/.zshrc
|
||||
echo "export all_proxy=http://127.0.0.1:38457" >>~/.zshrc
|
||||
|
||||
export all_proxy=http://127.0.0.1:38457
|
||||
EOF
|
||||
|
||||
source ~/.zshrc
|
||||
zsh -l
|
||||
|
0
install-oh-my-zsh.sh
Normal file → Executable file
0
install-oh-my-zsh.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user