From 99c1819cebfdc5776835c2b38aa1c4692cbb4d8b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki & Nathan Sobo Date: Mon, 25 Feb 2013 12:40:59 -0800 Subject: [PATCH] Install cli to /opt/boxen if it exists --- Rakefile | 7 ++++++- src/app/window.coffee | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index d6ad17752..13a3db9ff 100644 --- a/Rakefile +++ b/Rakefile @@ -40,7 +40,12 @@ task :install => [:clean, :build] do `cp -r #{path} #{File.expand_path(dest_path)}` # Install atom cli - cli_path = "/opt/github/bin/atom" + if File.directory?("/opt/boxen") + cli_path = "/opt/boxen/bin/atom" + else + cli_path = "/opt/github/bin/atom" + end + FileUtils.cp("#{ATOM_SRC_PATH}/atom.sh", cli_path) FileUtils.chmod(0755, cli_path) diff --git a/src/app/window.coffee b/src/app/window.coffee index ebdf10f37..d814ba22c 100644 --- a/src/app/window.coffee +++ b/src/app/window.coffee @@ -40,7 +40,11 @@ window.setUpEnvironment = -> # This method is only called when opening a real application window window.startup = -> - installAtomCommand('/opt/github/bin/atom') + if fs.isDirectory('/opt/boxen') + installAtomCommand('/opt/boxen/bin/atom') + else + installAtomCommand('/opt/github/bin/atom') + handleWindowEvents() config.load() atom.loadTextPackage()