Install apm as apm-beta in beta version

This commit is contained in:
Max Brunsfeld
2015-09-21 15:32:14 -07:00
parent 1102a9687b
commit cd31f9506a
2 changed files with 49 additions and 29 deletions

View File

@@ -53,17 +53,22 @@ class CommandInstaller
detailedMessage: "The shell commands `atom` and `apm` are installed."
installAtomCommand: (askForPrivilege, callback) ->
launcherName = if @appVersion.includes("beta")
programName = if @appVersion.includes("beta")
"atom-beta"
else
"atom"
commandPath = path.join(@getResourcesDirectory(), 'app', 'atom.sh')
@createSymlink commandPath, launcherName, askForPrivilege, callback
@createSymlink commandPath, programName, askForPrivilege, callback
installApmCommand: (askForPrivilege, callback) ->
programName = if @appVersion.includes("beta")
"apm-beta"
else
"apm"
commandPath = path.join(@getResourcesDirectory(), 'app', 'apm', 'node_modules', '.bin', 'apm')
@createSymlink commandPath, 'apm', askForPrivilege, callback
@createSymlink commandPath, programName, askForPrivilege, callback
createSymlink: (commandPath, commandName, askForPrivilege, callback) ->
return unless process.platform is 'darwin'