Last active
March 19, 2018 17:27
-
-
Save stickystyle/a488b72d1f773bb8c0df14e3036f2621 to your computer and use it in GitHub Desktop.
Auto-backup installed packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
UPDATED="#Updated: $(date)" | |
PATH=/usr/local/bin:/usr/local/sbin:$PATH | |
echo $UPDATED > ~/Dropbox/home/python/requirements.txt | |
pip3 freeze >> ~/Dropbox/home/python/requirements.txt | |
echo $UPDATED > ~/Dropbox/home/homebrew/leaves.txt | |
brew leaves >> ~/Dropbox/home/homebrew/leaves.txt | |
echo $UPDATED > ~/Dropbox/home/homebrew/casks.txt | |
brew cask list >> ~/Dropbox/home/homebrew/casks.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>net.stickystyle.launched.save_packages</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-c</string> | |
<string>/Users/rparrish/Dropbox/home/backup_packages.sh</string> | |
</array> | |
<key>StandardErrorPath</key> | |
<string>/tmp/net.stickystyle.launched.save_packages.err</string> | |
<key>StandardOutPath</key> | |
<string>/tmp/net.stickystyle.launched.save_packages.out</string> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Hour</key> | |
<integer>12</integer> | |
<key>Minute</key> | |
<integer>0</integer> | |
</dict> | |
<key>WatchPaths</key> | |
<array> | |
<string>/usr/local/lib/python3.6/site-packages</string> | |
<string>/usr/local/Cellar</string> | |
<string>/opt/homebrew-cask/Caskroom</string> | |
</array> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment