mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 00:52:29 +03:00
Merge pull request #2653 from deprint/desktop-file-fix
Fix for installation of desktop file
This commit is contained in:
commit
0eecf49e61
@ -40,13 +40,15 @@ module.exports = (grunt) ->
|
|||||||
mkdir path.dirname(shareDir)
|
mkdir path.dirname(shareDir)
|
||||||
cp shellAppDir, shareDir
|
cp shellAppDir, shareDir
|
||||||
|
|
||||||
# Create Atom.desktop if installation in '/usr/local'
|
# Create Atom.desktop if installation not in temporary folder
|
||||||
applicationsDir = path.join('/usr','share','applications')
|
|
||||||
tmpDir = if process.env.TMPDIR? then process.env.TMPDIR else '/tmp'
|
tmpDir = if process.env.TMPDIR? then process.env.TMPDIR else '/tmp'
|
||||||
if installDir.indexOf(tmpDir) isnt 0 and fs.isDirectorySync(applicationsDir)
|
desktopInstallFile = path.join(installDir,'share','applications','Atom.desktop')
|
||||||
|
if installDir.indexOf(tmpDir) isnt 0
|
||||||
|
mkdir path.dirname(desktopInstallFile)
|
||||||
{description} = grunt.file.readJSON('package.json')
|
{description} = grunt.file.readJSON('package.json')
|
||||||
|
installDir = path.join(installDir,'.') # To prevent "Exec=/usr/local//share/atom/atom"
|
||||||
fillTemplate(desktopFile, {description, installDir, iconName})
|
fillTemplate(desktopFile, {description, installDir, iconName})
|
||||||
cp desktopFile, path.join(applicationsDir,'Atom.desktop')
|
cp desktopFile, desktopInstallFile
|
||||||
|
|
||||||
# Create relative symbol link for apm.
|
# Create relative symbol link for apm.
|
||||||
process.chdir(binDir)
|
process.chdir(binDir)
|
||||||
|
Loading…
Reference in New Issue
Block a user