Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
f14d7683
Commit
f14d7683
authored
Jan 15, 2018
by
Ed Reel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update nodebrew from v0.9.7-1 to v0.9.8
Add uninstall message
parent
7e719b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
packages/nodebrew.rb
packages/nodebrew.rb
+26
-20
No files found.
packages/nodebrew.rb
View file @
f14d7683
...
...
@@ -3,41 +3,47 @@ require 'package'
class
Nodebrew
<
Package
description
'Node.js version manager'
homepage
'https://github.com/hokaccha/nodebrew'
version
'v0.9.
7-1
'
source_url
'https://github.com/hokaccha/nodebrew/archive/v0.9.
7
.tar.gz'
source_sha256
'
3aa8b0cf30024d105f1ac6921aadf0440bc95bcae43df9d6ec58fc9de8cd352e
'
version
'v0.9.
8
'
source_url
'https://github.com/hokaccha/nodebrew/archive/v0.9.
8
.tar.gz'
source_sha256
'
040c1b32ddce6d83fda76a50ce9bc635ce0040f76a63617d74234449b8ff078b
'
depends_on
'perl'
def
self
.
install
system
"mkdir -p
#{
CREW_DEST_DIR
}#{
CREW_LIB_PREFIX
}
/nodebrew"
system
"NODEBREW_ROOT=
#{
CREW_DEST_DIR
}#{
CREW_LIB_PREFIX
}
/nodebrew perl nodebrew setup > /dev/null"
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/share/nodebrew"
system
"NODEBREW_ROOT=
#{
CREW_DEST_PREFIX
}
/share/nodebrew perl nodebrew setup > /dev/null"
system
"mkdir -p
#{
CREW_DEST_DIR
}
/$HOME"
system
"mkdir -p
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew/nodebrew
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew/current/bin/node
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew/current/bin/npm
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew/current/bin/npx
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew
#{
CREW_DEST_DIR
}
/$HOME/.nodebrew"
system
"ln -s
#{
CREW_LIB_PREFIX
}
/nodebrew $HOME/.nodebrew"
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/bin"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew/nodebrew
#{
CREW_DEST_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew/current/bin/node
#{
CREW_DEST_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew/current/bin/npm
#{
CREW_DEST_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew/current/bin/npx
#{
CREW_DEST_PREFIX
}
/bin/"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew
#{
CREW_DEST_DIR
}
/$HOME/.nodebrew"
system
"ln -s
#{
CREW_PREFIX
}
/share/nodebrew $HOME/.nodebrew"
end
def
self
.
postinstall
puts
puts
"Nodebrew completion support is available for the following shells:"
puts
"bash fish zsh"
puts
"Nodebrew completion support is available for the following shells:"
.
lightblue
puts
"bash fish zsh"
.
lightblue
puts
puts
"To add nodebrew completion for bash, execute the following:"
.
lightblue
puts
"echo '# nodebrew completion' >> ~/.bashrc"
.
lightblue
puts
"echo 'if [ -f
#{
CREW_
LIB_PREFIX
}
/nodebrew/completions/bash/nodebrew-completion ]; then' >> ~/.bashrc"
.
lightblue
puts
"echo ' source
#{
CREW_
LIB_PREFIX
}
/nodebrew/completions/bash/nodebrew-completion' >> ~/.bashrc"
.
lightblue
puts
"echo 'if [ -f
#{
CREW_
PREFIX
}
/share
/nodebrew/completions/bash/nodebrew-completion ]; then' >> ~/.bashrc"
.
lightblue
puts
"echo ' source
#{
CREW_
PREFIX
}
/share
/nodebrew/completions/bash/nodebrew-completion' >> ~/.bashrc"
.
lightblue
puts
"echo 'fi' >> ~/.bashrc"
.
lightblue
puts
"source ~/.bashrc"
.
lightblue
puts
puts
"To complete the installation, execute the following:"
.
lightblue
puts
"echo 'export PATH=
\$
HOME/.nodebrew/current/bin:
\$
PATH' >> ~/.bashrc && source ~/.bashrc"
.
lightblue
puts
puts
"To install the latest node, please execute:"
.
lightblue
puts
"
\t
nodebrew install-binary latest"
.
lightblue
puts
"
\t
nodebrew use latest"
.
lightblue
puts
"To install the latest node, execute:"
.
lightblue
puts
"nodebrew install-binary latest"
.
lightblue
puts
"nodebrew use latest"
.
lightblue
puts
puts
"To uninstall, execute the following:"
.
lightblue
puts
"crew remove nodebrew"
.
lightblue
puts
"rm -rf
#{
CREW_PREFIX
}
/share/nodebrew"
.
lightblue
puts
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment