npm update added to updateSystem fct
This commit is contained in:
parent
1868392053
commit
25f516fc89
1 changed files with 18 additions and 7 deletions
|
@ -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,19 +260,29 @@ 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 "
|
||||||
|
printf "\n[GEM] update gems\n" &>> $logFile
|
||||||
sudo gem update &>> $logFile
|
sudo gem update &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
repoAdded=0
|
repoAdded=0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue