From b2306424325b24f39a999fb36cb206ea2ccb67be Mon Sep 17 00:00:00 2001 From: shakasan Date: Wed, 3 Jan 2018 22:59:50 +0100 Subject: [PATCH] update improved --- core_functions.sh | 4 ++++ yggdrasil.sh | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core_functions.sh b/core_functions.sh index 8c4c9fc..f80f16b 100644 --- a/core_functions.sh +++ b/core_functions.sh @@ -102,6 +102,7 @@ function isMate () { # # system update +#TODO: add pip, npm, gem # function updateSystem () { typeset ret_code @@ -255,6 +256,8 @@ function installAppFromArchive () { # input : package manager, package name # package manager available : apt, pip, npm, gem, snap # TODO: add apm, flatpak, umake? +# TODO: update npm before update/install pkg +# FIXME: use pkg instead of $* # function installPackage () { typeset pkg="$*" @@ -672,6 +675,7 @@ function usage () { printf "Usage : yggdrasil [options]\n" printf " -a : install all apps (see doc for more details\n" printf " -c : install gtk themes and icons\n" + printf " -u : update system (apt,snap,...)\n" printf " -v : show verison number\n" printf " -h : show help & informations\n" } \ No newline at end of file diff --git a/yggdrasil.sh b/yggdrasil.sh index c57dddc..eaa6d2f 100755 --- a/yggdrasil.sh +++ b/yggdrasil.sh @@ -38,7 +38,7 @@ echo "--[ Yggdrasil log ]--[ "$cDate" ]--[ "$cTime" ]-----------------------" >> # # arguments/options management with getopts # -while getopts ":h,v,a,c,t" option; do +while getopts ":h,v,a,c,t,u" option; do case "$option" in t) #test purpose only installNightly @@ -73,6 +73,10 @@ while getopts ":h,v,a,c,t" option; do installThemes exit ;; + u) + updateSystem + exit + ;; h) # display help usage exit