From f6ef8a8b0cbb8c9ad699e7a6fd3764b8a3fb3511 Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Fri, 2 Oct 2015 11:36:19 -0700 Subject: [PATCH] refactor(n1): change launch script to N1.sh --- atom.sh => N1.sh | 0 README.md | 2 +- build/resources/linux/redhat/nylas.spec.in | 2 +- build/resources/win/atom.cmd | 2 +- build/resources/win/atom.js | 2 +- build/resources/win/atom.sh | 2 +- build/tasks/build-task.coffee | 4 ++-- build/tasks/install-task.coffee | 6 +++--- build/tasks/spec-task.coffee | 2 +- script/mkrpm | 4 ++-- src/browser/squirrel-update.coffee | 2 +- src/command-installer.coffee | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) rename atom.sh => N1.sh (100%) mode change 100755 => 100644 diff --git a/atom.sh b/N1.sh old mode 100755 new mode 100644 similarity index 100% rename from atom.sh rename to N1.sh diff --git a/README.md b/README.md index b24a4026b..b03c355d6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Once you have a token: git clone https://github.com/nylas/N1.git cd N1 script/bootstrap - ./n1 --dev + ./N1.sh --dev ``` Our early access tokens are designed control access to our production mail sync diff --git a/build/resources/linux/redhat/nylas.spec.in b/build/resources/linux/redhat/nylas.spec.in index 6f9896c9f..06b187bb0 100644 --- a/build/resources/linux/redhat/nylas.spec.in +++ b/build/resources/linux/redhat/nylas.spec.in @@ -14,7 +14,7 @@ mkdir -p %{buildroot}/usr/local/share/Nylas cp -r /tmp/nylas-build/Nylas/* %{buildroot}/usr/local/share/Nylas mkdir -p %{buildroot}/usr/local/bin/ ln -sf /usr/local/share/nylas/resources/app/apm/node_modules/.bin/apm %{buildroot}/usr/local/bin/apm -cp atom.sh %{buildroot}/usr/local/bin/nylas +cp N1.sh %{buildroot}/usr/local/bin/nylas chmod 755 nylas mkdir -p %{buildroot}/usr/local/share/applications/ mv nylas.desktop %{buildroot}/usr/local/share/applications/ diff --git a/build/resources/win/atom.cmd b/build/resources/win/atom.cmd index 04a4ccbb0..b526ac8e8 100644 --- a/build/resources/win/atom.cmd +++ b/build/resources/win/atom.cmd @@ -16,7 +16,7 @@ FOR %%a IN (%*) DO ( ) IF "%EXPECT_OUTPUT%"=="YES" ( - "%~dp0\..\..\atom.exe" %* + "%~dp0\..\..\nylas.exe" %* ) ELSE ( "%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %* ) diff --git a/build/resources/win/atom.js b/build/resources/win/atom.js index df059aa5b..7c6eaff53 100644 --- a/build/resources/win/atom.js +++ b/build/resources/win/atom.js @@ -1,7 +1,7 @@ var path = require('path'); var spawn = require('child_process').spawn; -var atomCommandPath = path.resolve(__dirname, '..', '..', 'atom.exe'); +var atomCommandPath = path.resolve(__dirname, '..', '..', 'nylas.exe'); var arguments = process.argv.slice(2); arguments.unshift('--executed-from', process.cwd()); var options = {detached: true, stdio: 'ignore'}; diff --git a/build/resources/win/atom.sh b/build/resources/win/atom.sh index 96370bee5..a2c0567c8 100644 --- a/build/resources/win/atom.sh +++ b/build/resources/win/atom.sh @@ -16,7 +16,7 @@ while getopts ":fhtvw-:" opt; do done if [ $EXPECT_OUTPUT ]; then - "$0/../../../atom.exe" "$@" + "$0/../../../nylas.exe" "$@" else "$0/../../app/apm/bin/node.exe" "$0/../atom.js" "$@" fi diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index fb9e73831..9e7329673 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -37,7 +37,7 @@ module.exports = (grunt) -> mkdir appDir if process.platform isnt 'win32' - cp 'atom.sh', path.resolve(appDir, '..', 'new-app', 'atom.sh') + cp 'N1.sh', path.resolve(appDir, '..', 'new-app', 'N1.sh') cp 'package.json', path.join(appDir, 'package.json') cp path.join('build', 'resources', 'nylas.png'), path.join(appDir, 'nylas.png') @@ -174,7 +174,7 @@ module.exports = (grunt) -> if process.platform is 'win32' cp path.join('build', 'resources', 'win', 'atom.cmd'), path.join(shellAppDir, 'resources', 'cli', 'atom.cmd') - cp path.join('build', 'resources', 'win', 'atom.sh'), path.join(shellAppDir, 'resources', 'cli', 'atom.sh') + cp path.join('build', 'resources', 'win', 'N1.sh'), path.join(shellAppDir, 'resources', 'cli', 'N1.sh') cp path.join('build', 'resources', 'win', 'atom.js'), path.join(shellAppDir, 'resources', 'cli', 'atom.js') cp path.join('build', 'resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh') diff --git a/build/tasks/install-task.coffee b/build/tasks/install-task.coffee index 181adb6c0..79125cc82 100644 --- a/build/tasks/install-task.coffee +++ b/build/tasks/install-task.coffee @@ -36,9 +36,9 @@ module.exports = (grunt) -> iconName = path.join(shareDir, 'resources', 'app', 'resources', 'nylas.png') mkdir binDir - # Note that `atom.sh` can't be renamed `nylas.sh` because `apm` - # is currently hard-coded to call `atom.sh` - cp 'atom.sh', path.join(binDir, 'nylas') + # Note that `N1.sh` can't be renamed `nylas.sh` because `apm` + # is currently hard-coded to call `N1.sh` + cp 'N1.sh', path.join(binDir, 'nylas') rm shareDir mkdir path.dirname(shareDir) cp shellAppDir, shareDir diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 307518ad7..f05bc2d8a 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -137,7 +137,7 @@ module.exports = (grunt) -> done = @async() testSucceeded = false testOutput = "" - testProc = proc.spawn("./atom.sh", ["--test"]) + testProc = proc.spawn("./N1.sh", ["--test"]) testProc.stdout.on 'data', (data) -> str = data.toString() diff --git a/script/mkrpm b/script/mkrpm index 58f3fb5a2..e48afab6f 100755 --- a/script/mkrpm +++ b/script/mkrpm @@ -13,8 +13,8 @@ rpmdev-setuptree cp -r $BUILD_DIRECTORY/Nylas/* $RPM_BUILD_ROOT/BUILD cp $SPEC_FILE $RPM_BUILD_ROOT/SPECS -cp ./atom.sh $RPM_BUILD_ROOT/BUILD -cp $RPM_BUILD_ROOT/BUILD/atom.sh $RPM_BUILD_ROOT/BUILD/nylas +cp ./N1.sh $RPM_BUILD_ROOT/BUILD +cp $RPM_BUILD_ROOT/BUILD/N1.sh $RPM_BUILD_ROOT/BUILD/nylas cp $DESKTOP_FILE $RPM_BUILD_ROOT/BUILD rpmbuild -ba $SPEC_FILE diff --git a/src/browser/squirrel-update.coffee b/src/browser/squirrel-update.coffee index 11980d806..59925344c 100644 --- a/src/browser/squirrel-update.coffee +++ b/src/browser/squirrel-update.coffee @@ -91,7 +91,7 @@ addCommandsToPath = (callback) -> atomCommand = "@echo off\r\n\"%~dp0\\#{relativeAtomPath}\" %*" atomShCommandPath = path.join(binFolder, 'atom') - relativeAtomShPath = path.relative(binFolder, path.join(appFolder, 'resources', 'cli', 'atom.sh')) + relativeAtomShPath = path.relative(binFolder, path.join(appFolder, 'resources', 'cli', 'N1.sh')) atomShCommand = "#!/bin/sh\r\n\"$0/../#{relativeAtomShPath.replace(/\\/g, '/')}\" \"$@\"" apmCommandPath = path.join(binFolder, 'apm.cmd') diff --git a/src/command-installer.coffee b/src/command-installer.coffee index be0d92399..193a81921 100644 --- a/src/command-installer.coffee +++ b/src/command-installer.coffee @@ -50,7 +50,7 @@ module.exports = detailedMessage: "The shell commands `atom` and `apm` are installed." installAtomCommand: (resourcePath, askForPrivilege, callback) -> - commandPath = path.join(resourcePath, 'atom.sh') + commandPath = path.join(resourcePath, 'N1.sh') @createSymlink commandPath, askForPrivilege, callback installApmCommand: (resourcePath, askForPrivilege, callback) ->