mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
git: show either the Mac or the Linux message (not both)
This commit is contained in:
@@ -2,17 +2,22 @@
|
||||
set -e
|
||||
set -u
|
||||
|
||||
{
|
||||
function __init_git() {
|
||||
|
||||
if [ -z "$(command -v git)" ]; then
|
||||
>&2 echo "Error: to install 'git' on Mac or Linux use the built-in package manager."
|
||||
>&2 echo " for example: apt install -y git"
|
||||
>&2 echo " for example: xcode-select --install"
|
||||
# sudo xcodebuild -license accept
|
||||
|
||||
if [[ -n "$(uname -a | grep -i darwin)" ]]; then
|
||||
>&2 echo "Error: 'git' not found. You may have to re-install 'git' on Mac after every major update."
|
||||
>&2 echo " for example, try: xcode-select --install"
|
||||
# sudo xcodebuild -license accept
|
||||
else
|
||||
>&2 echo "Error: to install 'git' on Linux use the built-in package manager."
|
||||
>&2 echo " for example, try: xcode-select --install"
|
||||
fi
|
||||
exit 1
|
||||
else
|
||||
echo "'git' already installed"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
__init_git()
|
||||
|
||||
Reference in New Issue
Block a user