mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Do not use "/tmp" in scripts.
This commit is contained in:
parent
558778b4d4
commit
459309aa78
@ -1,5 +1,6 @@
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
os = require 'os'
|
||||
|
||||
fm = require 'json-front-matter'
|
||||
_ = require 'underscore-plus'
|
||||
@ -9,7 +10,8 @@ packageJson = require './package.json'
|
||||
module.exports = (grunt) ->
|
||||
appName = 'Atom.app'
|
||||
[major, minor, patch] = packageJson.version.split('.')
|
||||
buildDir = grunt.option('build-dir') ? '/tmp/atom-build'
|
||||
tmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp'
|
||||
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')
|
||||
|
@ -8,13 +8,14 @@ dialog = require 'dialog'
|
||||
fs = require 'fs'
|
||||
ipc = require 'ipc'
|
||||
path = require 'path'
|
||||
os = require 'os'
|
||||
net = require 'net'
|
||||
shell = require 'shell'
|
||||
url = require 'url'
|
||||
{EventEmitter} = require 'events'
|
||||
_ = require 'underscore-plus'
|
||||
|
||||
socketPath = '/tmp/atom.sock'
|
||||
socketPath = path.join(os.tmpdir(), 'atom.sock')
|
||||
|
||||
# Private: The application's singleton class.
|
||||
#
|
||||
|
@ -1,13 +1,16 @@
|
||||
path = require 'path'
|
||||
os = require 'os'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
{rm} = require('./task-helpers')(grunt)
|
||||
|
||||
grunt.registerTask 'partial-clean', 'Delete some of the build files', ->
|
||||
tmpdir = if process.platform is 'win32' then os.tmpdir() else '/tmp'
|
||||
|
||||
rm grunt.config.get('atom.buildDir')
|
||||
rm require('../src/coffee-cache').cacheDir
|
||||
rm require('../src/less-compile-cache').cacheDir
|
||||
rm '/tmp/atom-cached-atom-shells'
|
||||
rm path.join(tmpdir, 'atom-cached-atom-shells')
|
||||
rm 'atom-shell'
|
||||
|
||||
grunt.registerTask 'clean', 'Delete all the build files', ->
|
||||
|
@ -1,5 +1,6 @@
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
os = require 'os'
|
||||
|
||||
request = require 'request'
|
||||
formidable = require 'formidable'
|
||||
@ -70,7 +71,11 @@ module.exports = (grunt) ->
|
||||
else
|
||||
null
|
||||
|
||||
getCachePath = (version) -> "/tmp/atom-cached-atom-shells/#{version}"
|
||||
getTempDir = ->
|
||||
if process.platform is 'win32' then os.tmpdir() else '/tmp'
|
||||
|
||||
getCachePath = (version) ->
|
||||
path.join(getTempDir(), 'atom-cached-atom-shells', version)
|
||||
|
||||
isAtomShellVersionCached = (version) ->
|
||||
grunt.file.isFile(getCachePath(version), 'version')
|
||||
|
Loading…
Reference in New Issue
Block a user