1 Star 5 Fork 0

Git工具集/git_osx_installer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_installer.sh 935 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# wipe out the symlinks
if [ -d /usr/local/git ]; then
find /usr/local/git -type f | sed 's|/usr/local/git|/usr/local|g' | while read f; do [ -h "$f" ] && sudo rm $f || true; done
sudo rm -rf /usr/local/git
fi
echo "OK - running the installer. Come back and press a key when you're done."
open disk-image/git*.pkg
read -n 1
for file in /usr/local/git/bin/git "/usr/local/git/share/git-gui/lib/Git Gui.app/Contents/Info.plist"; do
printf "'$file'"
if [ -f "$file" ]; then
echo " - exists"
else
echo " DOES NOT EXIST!"
for n in {1..20}; do
echo "FAIL FAIL FAIL"
done
exit 1
fi
done
echo "Testing..."
(cd stage/*-$GIT_VERSION; find usr) | while read f; do
if ! [ -e "/$f" ]; then
echo "/$f did not get installed!"
exit 1
fi
done
if (ls -alR /usr/local/git/* | awk '{print $3}' | grep `whoami`); then
echo "Some user-owned files exist!"
exit 1
fi
echo "Success!"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/vcs-all-in-one/git_osx_installer.git
git@gitee.com:vcs-all-in-one/git_osx_installer.git
vcs-all-in-one
git_osx_installer
git_osx_installer
master

搜索帮助