Minor fix + Remove last references to /tmp

Esse commit está contido em:
Pritam Baral
2014-05-19 23:56:47 +05:30
commit 7627e0b0f0
6 arquivos alterados com 11 adições e 12 exclusões
+1 -2
Ver Arquivo
@@ -45,8 +45,7 @@ in the proper package's repository.
* Beware of platform differences * Beware of platform differences
* Use `require('atom').fs.getHomeDirectory()` to get the home directory. * Use `require('atom').fs.getHomeDirectory()` to get the home directory.
* Use `path.join()` to concatenate filenames. * Use `path.join()` to concatenate filenames.
* Temporary directory is not `/tmp` on Windows, use `os.tmpdir()` when * Use `os.tmpdir()` instead of `/tmp
possible
## Git Commit Messages ## Git Commit Messages
* Use the present tense * Use the present tense
+5 -3
Ver Arquivo
@@ -70,16 +70,18 @@ elif [ $OS == 'Linux' ]; then
USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
ATOM_PATH="$USR_DIRECTORY/share/atom/atom" ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
[ -x "$ATOM_PATH" ] || ATOM_PATH='/tmp/atom-build/Atom/atom' : ${TMPDIR:=/tmp}
[ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
if [ $EXPECT_OUTPUT ]; then if [ $EXPECT_OUTPUT ]; then
"$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
exit $? exit $?
else else
( (
nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > /tmp/atom-nohup.out 2>&1 nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$TMPDIR/atom-nohup.out" 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
cat /tmp/atom-nohup.out cat "$TMPDIR/atom-nohup.out"
exit $? exit $?
fi fi
) & ) &
+1 -3
Ver Arquivo
@@ -37,22 +37,20 @@ module.exports = (grunt) ->
[major, minor, patch] = packageJson.version.split('.') [major, minor, patch] = packageJson.version.split('.')
tmpDir = os.tmpdir() tmpDir = os.tmpdir()
appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom'
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
atomShellDownloadDir = path.join(os.tmpdir(), 'atom-cached-atom-shells') atomShellDownloadDir = path.join(os.tmpdir(), 'atom-cached-atom-shells')
symbolsDir = path.join(buildDir, 'Atom.breakpad.syms') symbolsDir = path.join(buildDir, 'Atom.breakpad.syms')
shellAppDir = path.join(buildDir, appName) shellAppDir = path.join(buildDir, appName)
if process.platform is 'win32' if process.platform is 'win32'
appName = 'Atom'
contentsDir = shellAppDir contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app') appDir = path.join(shellAppDir, 'resources', 'app')
installDir = path.join(process.env.ProgramFiles, appName) installDir = path.join(process.env.ProgramFiles, appName)
else if process.platform is 'darwin' else if process.platform is 'darwin'
appName = 'Atom.app'
contentsDir = path.join(shellAppDir, 'Contents') contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app') appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join('/Applications', appName) installDir = path.join('/Applications', appName)
else else
appName = 'Atom'
contentsDir = shellAppDir contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app') appDir = path.join(shellAppDir, 'resources', 'app')
installDir = process.env.INSTALL_PREFIX ? '/usr/local' installDir = process.env.INSTALL_PREFIX ? '/usr/local'
+1 -1
Ver Arquivo
@@ -5,7 +5,7 @@ module.exports = (grunt) ->
{rm} = require('./task-helpers')(grunt) {rm} = require('./task-helpers')(grunt)
grunt.registerTask 'partial-clean', 'Delete some of the build files', -> grunt.registerTask 'partial-clean', 'Delete some of the build files', ->
tmpdir = if process.platform is 'win32' then os.tmpdir() else '/tmp' tmpdir = os.tmpdir()
rm grunt.config.get('atom.buildDir') rm grunt.config.get('atom.buildDir')
rm require('../src/coffee-cache').cacheDir rm require('../src/coffee-cache').cacheDir
+1 -1
Ver Arquivo
@@ -15,7 +15,7 @@ FreeBSD -RELEASE 64-bit is the recommended platform.
```sh ```sh
git clone https://github.com/atom/atom git clone https://github.com/atom/atom
cd atom cd atom
script/build # Creates application at /tmp/atom-build/Atom script/build # Creates application at $TMPDIR/atom-build/Atom
sudo script/grunt install # Installs command to /usr/local/bin/atom sudo script/grunt install # Installs command to /usr/local/bin/atom
``` ```
+2 -2
Ver Arquivo
@@ -15,9 +15,9 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
```sh ```sh
git clone https://github.com/atom/atom git clone https://github.com/atom/atom
cd atom cd atom
script/build # Creates application at /tmp/atom-build/Atom script/build # Creates application at $TMPDIR/atom-build/Atom
sudo script/grunt install # Installs command to /usr/local/bin/atom sudo script/grunt install # Installs command to /usr/local/bin/atom
script/grunt mkdeb # Generates a .deb package at /tmp/atom-build script/grunt mkdeb # Generates a .deb package at $TMPDIR/atom-build
``` ```
## Troubleshooting ## Troubleshooting