GithubHelp home page GithubHelp logo

brew42's Introduction

Brew42

A tool to install Homebrew on 42US iMacs without admin access.

What it does:

  • Goes through all of the necessary steps to install Homebrew on 42US iMacs and performs any actions needed such as:
    • Checks for local goinfre directory, creates one if it doesn't exist.
    • Checks if homebrew is installed, installs it if not. Updates it if it is.
    • Checks that PATH variable has been changed to use 'brew' and other commands, appends export PATH to .zshrc if it has not been, then reloads .zshrc.
  • Installs specific Homebrew packages, and can be edited to add or remove default packages.
  • If package is already installed, prompts to update package.

Usage

1. Open terminal where you want to save the script.
2. Type git clone https://github.com/Etregoning/brew42 && cd $_
3. Type sh brew42.sh
4. Follow prompts


Customization

Example Script

Replace PACKAGE-NAME with name of package you want to add. No caps.

if [ ! -e "$GOINFRE/brew/bin/PACKAGE-NAME" ] ; then
  brew install PACKAGE-NAME
		if [ -e "$GOINFRE/brew/bin/PACKAGE-NAME" ] ; then
			echo "${GREEN}PACKAGE-NAME successfully installed. Version: \c" ; PACKAGE-NAME --version ; echo "${RESET}"
		else
			echo "${RED}PACKAGE-NAME failed to install.${RESET}"
		fi
else
	echo  "\nPACKAGE-NAME is already installed. ${GREEN}Version:${RESET} \c" ; PACKAGE-NAME --version
    while true ;  do
      read -p "Would you like to update it? [y/n] " yn
    	case $yn in
        	[Yy]* ) brew upgrade PACKAGE-NAME ; break ;;
        	[Nn]* ) break ;;
        	* ) echo "${RED}Please answer y for yes or n for no.${RESET}" ;;
    	esac
    done
	fi
done
echo "--------------------"

TO DO

  • At the end, list details about any errors that might have occured.
  • Write said errors into log file as well

brew42's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.