mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
Fix bugs in node-update
This commit is contained in:
parent
27db941148
commit
fc90ae7149
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,7 @@ echo "> Setting ownership of /usr/local to $USER"
|
|||
sudo chown -R ${USER}:${USER} /usr/local
|
||||
|
||||
echo "> Moving extracted node.js binaries"
|
||||
if [[ "$(pwd)" -ne "/usr/local/lib" ]]; then
|
||||
if [ "$(pwd)" != "/usr/local/lib" ]; then
|
||||
rm -rf /usr/local/lib/${NODEJS} && mv ${NODEJS} /usr/local/lib
|
||||
fi
|
||||
|
||||
|
@ -20,5 +20,8 @@ sudo rm -f /usr/local/bin/{iojs,node,npm,node-gyp}
|
|||
ln -s /usr/local/lib/${NODEJS}/bin/node /usr/local/bin/node
|
||||
ln -s /usr/local/lib/${NODEJS}/bin/npm /usr/local/bin/npm
|
||||
|
||||
echo "> Global prefix"
|
||||
npm config set prefix /usr/local
|
||||
|
||||
echo "node.js version: $(node -v), npm version: $(npm -v)"
|
||||
|
||||
|
|
Loading…
Reference in a new issue