npm update added to updateSystem fct

This commit is contained in:
Francois B. (Makoto) 2018-06-13 12:06:43 +02:00
parent 1868392053
commit 25f516fc89

View file

@ -228,6 +228,7 @@ function kernelUpdate () {
# #
# system update # system update
# input : normal/full
#TODO: add pip, npm (yarn?), gem #TODO: add pip, npm (yarn?), gem
# #
function updateSystem () { function updateSystem () {
@ -259,18 +260,28 @@ function updateSystem () {
retCode $ret_code retCode $ret_code
fi fi
if which npm >/dev/null; then
printf "[NPM] update npm "
printf "\n[NPM] update npm\n" &>> $logFile
sudo npm i -g npm &>> $logFile
ret_code=$?
retCode $ret_code
fi
if which gem >/dev/null; then if which gem >/dev/null; then
printf "[GEM] updating --system " printf "[GEM] update --system "
printf "\n[GEM] updating --system\n" &>> $logFile printf "\n[GEM] update --system\n" &>> $logFile
sudo gem update --system &>> $logFile sudo gem update --system &>> $logFile
ret_code=$? ret_code=$?
retCode $ret_code retCode $ret_code
printf "[GEM] updating gems " if [ "$1" == "full" ]; then
printf "\n[GEM] updating gems\n" &>> $logFile printf "[GEM] update gems "
sudo gem update &>> $logFile printf "\n[GEM] update gems\n" &>> $logFile
ret_code=$? sudo gem update &>> $logFile
retCode $ret_code ret_code=$?
retCode $ret_code
fi
fi fi
repoAdded=0 repoAdded=0