diff --git a/rake/node/io.rake b/rake/node/io.rake index d8dde904..a3732fa2 100644 --- a/rake/node/io.rake +++ b/rake/node/io.rake @@ -2,6 +2,7 @@ desc "My main computer" task :io do [ "pkg:update", "pkg:osx", + "pkg:nodejs", "pkg:zsh", "pkg:vim", "pkg:emacs", @@ -16,7 +17,6 @@ task :io do "imagealpha", "imageoptim", "xquartz", - "things", "openemu", "transmit", "transmission", diff --git a/rake/pkg/emacs.rake b/rake/pkg/emacs.rake index b15b46e3..83b5aa71 100644 --- a/rake/pkg/emacs.rake +++ b/rake/pkg/emacs.rake @@ -21,9 +21,7 @@ if is_mac? def setup_node echo "Installing node dependencies" - node_reqs.each do |pkg| - sh_safe "/usr/local/bin/npm install -g #{pkg}" - end + sh_safe "/usr/local/bin/npm install -g #{node_reqs.join(' ')}" end def setup_emacs_d @@ -60,10 +58,13 @@ if is_mac? end task :update => "emacs:install" do - if emacs_installed? + if emacs_installed? && Dir.exists?("#{ENV['EMACS_D']}/.git") echo "Updating emacs.d & packages" 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" end diff --git a/rake/pkg/zsh.rake b/rake/pkg/zsh.rake index 6fe7d6ba..b4846449 100644 --- a/rake/pkg/zsh.rake +++ b/rake/pkg/zsh.rake @@ -17,7 +17,7 @@ namespace :zsh do unless `printenv SHELL | grep "/zsh$"` echo "Setting shell to ZSH", 2 zsh_bin = is_mac? ? "/usr/local/bin/zsh" : "/usr/bin/zsh" - if !File.exists? zsh_bin + unless File.exists? zsh_bin error "ZSH isn't in #{File.dirname(zsh_bin)}" next end @@ -28,7 +28,7 @@ namespace :zsh do sh_safe "echo '#{zsh_bin}' | sudo tee -a /etc/shells" end - sh_safe "chsh -s #{zsh_bin}" + sh "chsh -s #{zsh_bin}" end echo "Comment out path_helper to fix PATH in emacs!" if is_mac?