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