Skip to content

Commit

Permalink
Merge pull request #107 from barriosnahuel/fix/node-installation
Browse files Browse the repository at this point in the history
Fix/node installation
  • Loading branch information
barriosnahuel authored Jun 18, 2019
2 parents d695661 + 4a9a448 commit 0466cfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v2.4.1
## Fixed
- Duplicated logs.
- NodeJS and npm installation.

# v2.4.0
## Added
- GIT diff-so-fancy to use `git diff` the right way. #70
Expand Down
5 changes: 2 additions & 3 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ logInfo (){
}

logSummary (){
echo "INFO - EFU: $1 $2 $3"
logInfo "$1 $2 $3"
echo "INFO - EFU: $1 $2 $3" >> ~/Downloads/summary.efu.log
}

Expand All @@ -29,8 +29,7 @@ logAlreadyInstalled (){
}

logProgramVersion (){
logInfo "$1" "$2" "$3"
logSummary "Installed $1 $2 $3" >> ~/Downloads/summary.efu.log
logSummary "Installed $1 $2 $3"
}

preInstallationLog(){
Expand Down
8 changes: 7 additions & 1 deletion modules/nodejs.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash
# Created by Nahuel Barrios on 24/3/16.
# shellcheck disable=SC1090

enterDirOrExit "${CURRENT_DIR}"

if ! command -v nvm >/dev/null; then
preInstallationLog "NVM"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
logInfo "Remember to add --no-use to your .zshrc as mentioned here: https://github.com/creationix/nvm#install--update-script"

# Required to be able to call > nvm XXX on current terminal session.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

postInstallationLog "NVM"
else
logAlreadyInstalled "NVM"
Expand Down

0 comments on commit 0466cfe

Please sign in to comment.