2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-17 09:25:52 +00:00
steffen-dotfiles/Jakefile.js

74 lines
1.8 KiB
JavaScript
Raw Normal View History

/*global desc: true*/
/*global task: true*/
/*global jake: true*/
/*global namespace: true*/
/*global console: true*/
/*global exec: true*/
desc('Default task');
task('default', [], function(params) {
jake.Task['setup:link'].invoke();
jake.Task['setup:submodules'].invoke();
});
namespace('setup', function() {
desc('Links files and dirs to your home directory');
task('link', [], function(params) {
console.log('Linking files and dirs to your home directory...');
var cmds = [
2013-02-09 13:56:14 +00:00
'ln -s ~/dotfiles/vim ~/.vim',
'ln -s ~/dotfiles/oh-my-zsh ~/.oh-my-zsh',
'ln -s ~/dotfiles/gitconfig ~/.gitconfig',
'ln -s ~/dotfiles/gitignore ~/.gitignore',
'ln -s ~/dotfiles/hgignore_global ~/.hgignore_global',
'ln -s ~/dotfiles/jshintrc ~/.jshintrc',
'ln -s ~/dotfiles/pearrc ~/.pearrc',
2013-05-12 21:04:18 +00:00
'ln -s ~/dotfiles/slate.js ~/.slate.js',
2013-02-09 13:56:14 +00:00
'ln -s ~/dotfiles/tmux.conf ~/.tmux.conf',
'ln -s ~/dotfiles/vimrc ~/.vimrc',
2013-05-12 21:04:18 +00:00
'ln -s ~/dotfiles/zshrc ~/.zshrc'
];
jake.exec(cmds, function() {
console.log('Linking complete.');
}, { printStdout: true } );
});
desc('Inits and updates the submodules');
task('submodules', [], function(params) {
console.log('Initializing and updating the git submodules...');
var cmds = [
'git submodule init',
'git submodule update',
2013-05-12 21:04:18 +00:00
'git submodule foreach git checkout master',
'git submodule foreach git pull'
];
jake.exec(cmds, function() {
console.log('Submodules complete.');
}, { printStdout: true } );
});
});
desc('Activate zsh');
task('zsh', [], function() {
console.log('Activating ZSH...');
var cmds = [
'chsh -s `which zsh`',
'/usr/bin/env zsh',
2012-09-11 18:57:42 +00:00
'source ~/.zshrc',
'sudo mv /etc/zshenv /etc/zprofile'
];
jake.exec(cmds, function() {
console.log('ZSH activated.');
});
});