2
1
I'd like to develop a bash script to capture the currently installed Homebrew formula, then be able to reinstall these formulas in the event that I need to reinstall my OS.
I'm hoping to combine these two segments into a single, parametrized script:
Capture currently-installed formulas:
#!/bin/sh
# capture
brew list >> ~/sh.brew.formulas.txt
Install Homebrew and formulas:
#!/bin/sh
#
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# get most-recent list of formulas
brew update
# disable macports
# TODO
# process list of formulas that have been installed
for i in $(cat ~/sh.brew.formulas.txt) ; do
brew install $i
done
Then call it:
$ ./brewer.sh archive
$ ./brewer.sh install
Any suggestions?
Would be more helpful if you described what the exact problem was and how you solved i. – slhck – 2014-10-31T18:01:05.757