make-brew-installer

-nouveau nom
-ajout de l’installation des Command Line Tools
-ajout de l’installationde Homebrew
This commit is contained in:
2018-08-02 19:36:53 +02:00
parent 31b3decbe2
commit 76795cd740
3 changed files with 123 additions and 1 deletions

47
_test/installer.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
echo '#!/bin/bash' >> brew-install.sh
echo '
installCLT() {
echo -e "/n Installing Command Line Tools (CLT) for Xcode"
sudo xcode-select --install
}' >> brew-install.sh
echo '
installHomebrew() {
echo -e "/n Installing Homebrew"
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#sudo chown -R $USER /usr/local/
#export $PATH=/usr/local/bin:$PATH
brew update
}' >> brew-install.sh
#if type xcode-select >&- && xpath=$( xcode-select --print-path ) &&
# test -d "${xpath}" && test -x "${xpath}" ; then
# #... is correctly installed
#else
# #... isn't correctly installed
#fi
echo '
clt=$(xcode-select --install 2>&1 | grep installed)
if [ -n "$clt" ]; then
echo "Command Line Tools (CLT) for Xcode already installed";
else
echo "Installing Command Line Tools (CLT) for Xcode";
fi' >> brew-install.sh
echo '
if [[ $(command -v brew) == "" ]]; then
installHomebrew
else
echo "Updating Homebrew"
brew update
fi' >> brew-install.sh
chmod +x brew-install.sh