Skip to content

Instantly share code, notes, and snippets.

@romuloceccon
Created March 14, 2017 11:37
Show Gist options
  • Select an option

  • Save romuloceccon/9f8f3f020ab6ce53784aa60046c26d8f to your computer and use it in GitHub Desktop.

Select an option

Save romuloceccon/9f8f3f020ab6ce53784aa60046c26d8f to your computer and use it in GitHub Desktop.
Patch to install Atom in custom location
diff --git a/script/lib/install-application.js b/script/lib/install-application.js
index be790b4..477265b 100644
--- a/script/lib/install-application.js
+++ b/script/lib/install-application.js
@@ -39,7 +39,7 @@ module.exports = function (packagedAppPath) {
const apmExecutableName = CONFIG.channel === 'beta' ? 'apm-beta' : 'apm'
const appName = CONFIG.channel === 'beta' ? 'Atom Beta' : 'Atom'
const appDescription = CONFIG.appMetadata.description
- const userLocalDirPath = path.join('/usr', 'local')
+ const userLocalDirPath = '/home/romulo/opt/atom'
const shareDirPath = path.join(userLocalDirPath, 'share')
const installationDirPath = path.join(shareDirPath, atomExecutableName)
const applicationsDirPath = path.join(shareDirPath, 'applications')
@@ -67,7 +67,7 @@ module.exports = function (packagedAppPath) {
const desktopEntryTemplate = fs.readFileSync(path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'atom.desktop.in'))
const desktopEntryContents = template(desktopEntryTemplate)({
appName, appFileName: atomExecutableName, description: appDescription,
- installDir: '/usr', iconPath
+ installDir: '/home/romulo/opt/atom', iconPath
})
fs.writeFileSync(desktopEntryPath, desktopEntryContents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment