mv ~/.atom/ ~/.atom.bak # Backup files if they exist
git clone git@github.com/gibsjose/atom.git ~/.atom
apm install --packages-file packages.txt
apm list --installed --bare > packages.txt
This can be automated using crontab
as follows:
crontab -e
When crontab
opens in a new window of your $EDITOR
, add one of the following lines (or make your own):
# Ex: Run once every 15 minutes
*/15 * * * * apm list --installed --bare > ~/.atom/packages.txt
# Ex: Run once every hour
0 * * * * apm list --installed --bare > ~/.atom/packages.txt
Alternatively, you can invoke crontab
to take input from a file:
crontab <file>
Or from STDIN
:
crontab -
To list your crontab
and verify everything is listed correctly:
crontab -l
A handy crontab
syntax generator can be found here.