mirror of
https://github.com/webgefrickel/dotfiles
synced 2024-11-11 07:10:40 +00:00
74 lines
1.8 KiB
JavaScript
74 lines
1.8 KiB
JavaScript
/*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 = [
|
|
'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',
|
|
'ln -s ~/dotfiles/slate.js ~/.slate.js',
|
|
'ln -s ~/dotfiles/tmux.conf ~/.tmux.conf',
|
|
'ln -s ~/dotfiles/vimrc ~/.vimrc',
|
|
'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',
|
|
'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',
|
|
'source ~/.zshrc',
|
|
'sudo mv /etc/zshenv /etc/zprofile'
|
|
];
|
|
|
|
jake.exec(cmds, function() {
|
|
console.log('ZSH activated.');
|
|
});
|
|
});
|