Clean up rakefiles
This commit is contained in:
parent
4ae0ab9c12
commit
e381d520d9
|
@ -1,5 +1,7 @@
|
|||
desc "My main computer"
|
||||
task :io do
|
||||
sh "cd ~/.dotfiles && git pull"
|
||||
|
||||
[ "pkg:update",
|
||||
"pkg:osx",
|
||||
"pkg:nodejs",
|
||||
|
|
|
@ -6,7 +6,6 @@ if is_mac?
|
|||
[ "emacs --with-gnutls --cocoa",
|
||||
"ispell",
|
||||
"cask",
|
||||
"rsense",
|
||||
"markdown" ]
|
||||
end
|
||||
|
||||
|
@ -40,7 +39,7 @@ if is_mac?
|
|||
|
||||
namespace :emacs do
|
||||
desc "Install emacs completely"
|
||||
task :install => ["nodejs:install", :setup, :setup_node, :setup_emacs_d]
|
||||
task :install => ["pkg:nodejs:install", :setup, :setup_node, :setup_emacs_d]
|
||||
|
||||
desc "Setup required homebrew packages"
|
||||
task :setup do
|
||||
|
@ -63,10 +62,7 @@ if is_mac?
|
|||
sh_safe "cd '#{ENV["EMACS_D"]}' && git pull && cask update"
|
||||
|
||||
# Update node
|
||||
sh_safe "/usr/local/bin/npm update -g #{node_reqs.join(' ')}"
|
||||
|
||||
# Update rsense config
|
||||
sh_safe "/usr/bin/env ruby `brew --prefix rsense`/libexec/etc/config.rb > ~/.rsense"
|
||||
sh "/usr/local/bin/npm update -g #{node_reqs.join(' ')}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ def node_installed?
|
|||
end
|
||||
|
||||
desc "Ensure nodejs & its prerequisites are installed"
|
||||
task :nodejs => "nodejs:update"
|
||||
task :nodejs => "pkg:nodejs:update"
|
||||
|
||||
namespace :nodejs do
|
||||
desc "Install node.js completely"
|
||||
|
@ -20,8 +20,8 @@ namespace :nodejs do
|
|||
end
|
||||
end
|
||||
|
||||
unless node_installed?
|
||||
task :update => "nodejs:install" do
|
||||
if node_installed?
|
||||
task :update => :install do
|
||||
echo "Updating node"
|
||||
if is_mac?
|
||||
Package.update "node"
|
||||
|
|
Loading…
Reference in a new issue