Even better

This commit is contained in:
Thomas Forgione 2019-06-05 09:52:50 +02:00
parent 1771494895
commit 3b1e30686d
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 1 additions and 5 deletions

View File

@ -263,11 +263,7 @@ update-npm() {
start_npm_update=`date +%s` start_npm_update=`date +%s`
echo -e "\033[32;1m=== Updating node packages ===\033[0m" echo -e "\033[32;1m=== Updating node packages ===\033[0m"
npm update -g
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm install -g `echo $package | cut -d '@' -f 1`
done
seconds=$((`date +%s` - $start_npm_update )) seconds=$((`date +%s` - $start_npm_update ))
formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'` formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'`