Skip to content

Instantly share code, notes, and snippets.

@mark-schaal
Last active January 15, 2018 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mark-schaal/0dda961412a5c31891a5bf86a53bcfdd to your computer and use it in GitHub Desktop.
Save mark-schaal/0dda961412a5c31891a5bf86a53bcfdd to your computer and use it in GitHub Desktop.
Regenerates a local Home-brew installation from a Leaves export
#!/bin/sh
# Copy Homebrew manifest file from an S3 Bucket into the local system
aws s3 cp s3://<path>/<to>/<something.file> /tmp/homebrew-manifest.txt
# Iterate through each line of brew and install the identified package
# Assumes that the manifest file's schema was generated from the
# `brew leaves > homebrew-manifest.txt` command.
cat /tmp/homebrew-manifest.txt | \
while read CMD;
do brew install $CMD;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment