Coder Social home page Coder Social logo

setup's Introduction

Setup

GitHub Version Release Date MIT License Used By

Commits Since GitHub last commit GitHub Commit Activity GitHub repo Size Lines of Code

GitHub Issues GitHub Pull-Requests

GitHub Twitter

Automate Mac Setup

New Mac? Clean macOS install? Run Setup and automate it all!

Get most of the tedious configurations, application installs, and other settings automatically configured on your Mac.

Start with a Customizable Setup run.


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/bretonics/Setup/HEAD/setup.sh)"

Cancel the auto run with Ctrl-C if you want to modify apps.txt, formulae.txt, casks.txt, and/or Brewfile.

See Customizable Setup for a better way to utilize a custom Setup.

Installation Types

Main

This install includes the entire app, formulae, and cask collection, including those in the essentials install type and all modes. This is more for something like a Mac mini.

See the default Brewfile.

Essentials

This install includes a smaller subset of what I deem essential, must haves. It's intended more for a Macbook Pro where you don't need everything under the sun.

See the default Brewfile.

Secondary

Secondary setup modifies personalized Mac settings, and is run after the initial install. It requires more attention as it may ask for credential or information input. It runs by default if running 'main' type. You must pass the -s option otherwise, or you can always run it directly bash ./secondary.sh.

Modes

Directories in ./src/mode separate other installation modes that can be run in addition to the 'main' or 'essentials' install chosen.

Each directory keeps track of individual programs (Apps, Formulae, and Casks) to install for the specific mode, via their own Brewfile, and includes an install.sh for all logic pertaining to the mode.

Available modes:

  • dev
  • fun

Options

$ ./install.sh -h

Usage: install.sh [Options] Brewfile


Running install without any options below will run a MAIN setup by default.


Options:

    -B                      Sync backups from latest Time Machine backup
    -D                      Use defaults (skip confirmation when applying secondary settings)
    -E                      Essentials only installations
    -F                      Run full main install with defaults (Sets -B, -D, -P, and -s)
    -M                      Main install type (-s=true)
    -P                      Set Mac setting system preference defaults (Default: false)
    -i [main|essentials]    Explicit install type declaration, i.e. -M or -E)
    -m <mode>               Run additional specified mode installation (in ./src/mode)
    -s                      Run secondary installation (Default: false)
    -h                      Prints this usage message

Arguments:

    Brewfile                Path to Brew bundle file (Default: './src/Brewfile')

Customizable Setup

I suggest using your own Brewfile. If you don't have one, see Useful Commands to create one before running Setup, and pass this to the program as followed:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/bretonics/Setup/HEAD/setup.sh)" "" ~/absolute/path/to/Brewfile

You can also pass any of the available options:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/bretonics/Setup/HEAD/setup.sh)" "" -E

Manual

You probably want to do this --unless you really like everything configured as I do (we both know you don't)--and don't have a Brewfile to run a customized setup.

Download the repo or fork it to do a custom install and modify the following:

Brewfile

Modify the ./src/Brewfile and run bash install, or pass your own: bash install /absolute/path/to/my/Brewfile.

Personalizations

  1. Modify files containing list of apps and their respective Mac App Store product identifiers, formulae, and/or casks that you want installed in the src directory.

  2. Run bash install.sh -E

  3. Optional: bash secondary.sh


Useful Commands

# List all installed Mac apps
mas list | sort -fk 2

# Create Brewfile
brew bundle dump

Contribute

Have a particular set of configurations to add? Feel free to create a PR!

If there's a particular set of commands, applications, or utilities you find useful, add an additional install mode (-m myMode).

  • Create a directory with the mode's name under src, i.e. src/mymode (lowercase)
  • The entrypoint is set to $MODE_INSTALL_FILE
  • A mode's entrypoint should be named install.sh
  • install.sh should be located in the named mode's directory, e.g. src/mymode
  • A mode's logic should be called from this entrypoint
  • Any and all files related to a mode are to be contained in the mode's root directory, i.e. src/mymode
  • You can use a Brewfile to organize and handle all resource installations (called from a mode's install.sh), or add individual text files for each set of apps, formulae, and casks (1 entry per line) and pass the file reference to these functions:
    • installApps
    • installFormulae
    • installCasks
  • It's encourage to mimic the root directory's structure, but it's not required
├── src/mymode
       ├── Brewfile
       ├── apps.txt
       ├── casks.txt
       ├── formulae.txt
       ├── install.sh
       ├── npm.txt
       ├── taps.txt
       └── vscode.txt

setup's People

Contributors

bretonics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

setup's Issues

v0.1.0

  1. #1
  2. Move Xcode dev tools install to setup script

    For greater download efficiency and be able to have git for submodules

  3. #3
  4. #4

v2.0.0 Fixes

  • Add default branch main setting: git config --global init.defaultBranch main
  • Fix mode relative path resolution, i.e. dev's node and VS Code ext
  • Make sure all ZSH completions are correct

Add git configuration

Add global git (GitHub) configuration for username and email, git config --global.

Refactor getops logic to fine control install

Refactor to take into account for a more refined control. Update global variables for each individual install procedure, i.e. homebrew, apps, settings, etc.

Goal: allow more refined control of install and arguments passed to run setup.

SETUP_MODE="FULL" to set all these flags as true

macOS Sierra Xcode install

xcode-select --install does not install dependencies needed by mas, failing all mas install <app> commands, requiring manual Xcode install via Mac App Store. mas version > 1.4.2 requires Xcode version > 10.0.

  • Passes in macOS High Sierra.

Workaround - install mas v1.4.2 directly:

brew install https://raw.githubusercontent.com/mas-cli/mas/v1.4.2/Homebrew/mas.rb

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.