npm/gem upd moved to yggInit

This commit is contained in:
Francois B. (Makoto) 2018-06-13 12:18:19 +02:00
parent 25f516fc89
commit 8f3b0f3f22
2 changed files with 11 additions and 26 deletions

View file

@ -170,6 +170,11 @@ function yggInit () {
installPackage apt "ruby-dev" installPackage apt "ruby-dev"
else else
printf "[INIT][GEM] found [ "$BOLDVERT"OK"$NORMAL" ] \n" printf "[INIT][GEM] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
printf "[GEM] update --system "
printf "\n[GEM] update --system\n" &>> $logFile
sudo gem update --system &>> $logFile
ret_code=$?
retCode $ret_code
fi fi
# SNAP # SNAP
@ -188,6 +193,11 @@ function yggInit () {
installPackage apt "nodejs" installPackage apt "nodejs"
else else
printf "[INIT][NPM] found [ "$BOLDVERT"OK"$NORMAL" ] \n" printf "[INIT][NPM] found [ "$BOLDVERT"OK"$NORMAL" ] \n"
printf "[NPM] update npm "
printf "\n[NPM] update npm\n" &>> $logFile
sudo npm i -g npm &>> $logFile
ret_code=$?
retCode $ret_code
fi fi
# PIP3 # PIP3
@ -228,7 +238,6 @@ 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 () {
@ -260,30 +269,6 @@ 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
printf "[GEM] update --system "
printf "\n[GEM] update --system\n" &>> $logFile
sudo gem update --system &>> $logFile
ret_code=$?
retCode $ret_code
if [ "$1" == "full" ]; then
printf "[GEM] update gems "
printf "\n[GEM] update gems\n" &>> $logFile
sudo gem update &>> $logFile
ret_code=$?
retCode $ret_code
fi
fi
repoAdded=0 repoAdded=0
} }

View file

@ -13,7 +13,7 @@
# #
# app version number # app version number
# #
version="0.5.0-b6" version="0.5.0-b7"
# #
# myHomedir is used in full paths to the homedir # myHomedir is used in full paths to the homedir