This commit is contained in:
陆柯 2023-11-11 21:46:24 +08:00
parent 4ddc1b2057
commit 78260a4599
4 changed files with 23 additions and 5 deletions

View File

@ -17,7 +17,7 @@ fi
read -p "maxdepth >>> " MAXDEPTH
if [ "$MAXDEPTH" ]
then
MAXDEPTH_CLAUSE="-mindepth $MAXDEPTH"
MAXDEPTH_CLAUSE="-maxdepth $MAXDEPTH"
fi
echo "To find file or directory? [f] for file, [d] for directory, [l] for link, [leave blank] for all:"

19
mac-homebrew-china.sh Normal file
View File

@ -0,0 +1,19 @@
echo === Enter [g] to reset git source to github, [c] to mirrors in china
read -p '>>> ' TARGET
if [ "$TARGET"='g' ]
then
git -C /usr/local/Homebrew remote set-url origin https://github.com/Homebrew/brew.git
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask remote set-url origin https://github.com/Homebrew/homebrew-cask
elif [ "$TARGET"='c' ]
then
git -C /usr/local/Homebrew remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 或 https://mirrors.aliyun.com/homebrew/brew.git
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 或 https://mirrors.aliyun.com/homebrew/homebrew-core.git
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
fi
# https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

0
mac-install-homebrew.sh → mac-homebrew-install.sh Executable file → Normal file
View File

View File

@ -18,9 +18,8 @@ function proxy(){
else
echo "--- Nothing changed."
fi
echo 测试 ip.gs, ip.sb, ipinfo.io
curl ipinfo.io
}
proxy
echo 测试 ip.gs, ip.sb, ipinfo.io
curl ipinfo.io
echo " "