Skip to content

eeerlend/macup-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macup-builder

macup is a node.js based framework for doing a single command bash-based installation on top of a macos installation.

The core principles are:

  • With help of a single configuration file, prepare your macos installation
  • With one terminal command (bash macup.sh), be able to install everything from scratch - ie. command line tools, git, even mac app store apps, user preferences, dotfiles etc.
  • The setup should be idempotent, so it can be run multiple times
  • Add whatever modules you would like to your own custom package. Either official ones, or your own.

Preparations

  1. First you need to prepare your package (Configuration is node.js based, but the package itself don't need node at all)
npx eeerlend/macup-builder setup

This will create a starting point for you, including a blank /dist/my.config file.

  1. Now, run npm install to get dependencies (see list below for available official modules. Only macup-core is installed by default). Installation copies the ./dist folder to your own project folder ./dist/packages/the-macup-module.

  2. Configure ./dist/my.config to your needs (take a look at the different modules for configuration options).

  3. Test your package form your project root;

bash macup.sh
  1. Push your package to github (either public or private), and create a "personal access token" to be used when installing your macup package.

Installation on mac client

  1. On your newly installed mac, run the following command in your terminal (replace YOUR_AUTHORIZATION_TOKEN and YOUR_REPO with yout own data):
curl -s -H "Authorization: token {YOUR_AUTHORIZATION_TOKEN}" -L https://api.github.com/repos/{YOUR_REPO}/tarball > macup-master.tar && ([ ! -d macup-master ] && mkdir macup-master); tar xfz macup-master.tar -C ./macup-master --strip-components=1 && rm macup-master.tar && cd macup-master && bash macup.sh

Voila!

Creating your own modules

Feel free to create and publish your own modules. To make it work with macup, the only thing needed is a postinstall hook in package.json, that does the following:

"scripts": {
  "postinstall": "require('macup-builder/packageHandler').copyModule('YOUR_MODULE_NAME')"
}

... and, the bash file being executed during installation needs to be ./dist/run.sh.

If your module have configurations - declare them in ./dist/package.config, and implement them in your projects ./dist/my.config

Official modules

You can extend macup, either with official modules, or with your own.

About

macup is a node.js based framework for doing a single command bash-based installation on top of a macos installation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors