From f9837aadaa68d9c9b46bc5dbe48d32b8db73bb1a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 28 Oct 2013 13:38:33 -0700 Subject: [PATCH] Split out win32 variable values --- Gruntfile.coffee | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index acdee187d..b115f5f60 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -8,14 +8,20 @@ _ = require 'underscore-plus' packageJson = require './package.json' module.exports = (grunt) -> - appName = if process.platform is 'win32' then 'Atom' else 'Atom.app' [major, minor, patch] = packageJson.version.split('.') - tmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp' + if process.platform is 'win32' + appName = 'Atom' + tmpDir = os.tmpdir() + installRoot = process.env.ProgramFiles + else + appName = 'Atom.app' + tmpDir = '/tmp' + installRoot = '/Applications' + buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') shellAppDir = path.join(buildDir, appName) contentsDir = path.join(shellAppDir, 'Contents') appDir = path.join(contentsDir, 'Resources', 'app') - installRoot = if process.platform is 'win32' then process.env.ProgramFiles else '/Applications' installDir = path.join(installRoot, appName) coffeeConfig =