mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Install Atom.desktop when installDir is not temporary
This commit is contained in:
@@ -42,7 +42,8 @@ module.exports = (grunt) ->
|
||||
|
||||
# Create Atom.desktop if installation in '/usr/local'
|
||||
applicationsDir = path.join('/usr','share','applications')
|
||||
if installDir is '/usr/local' and fs.isDirectorySync(applicationsDir)
|
||||
tmpDir = if process.env.TMPDIR? then process.env.TMPDIR else '/tmp';
|
||||
if installDir.indexOf(tmpDir) isnt 0 and fs.isDirectorySync(applicationsDir)
|
||||
{description} = grunt.file.readJSON('package.json')
|
||||
fillTemplate(desktopFile, {description, installDir, iconName})
|
||||
cp desktopFile, path.join(applicationsDir,'Atom.desktop')
|
||||
|
||||
Reference in New Issue
Block a user