From 84e1488db5baa74760735f4e216c9c3c357c5563 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Tue, 12 Jun 2018 18:27:54 +0200 Subject: [PATCH] prettified update and install script output --- tools/zim_install | 6 ++++-- tools/zim_update | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/zim_install b/tools/zim_install index 5fb5268..5979dce 100644 --- a/tools/zim_install +++ b/tools/zim_install @@ -6,7 +6,7 @@ mkdir -p ${ZIM_HOME}/modules for zmodule in ${zmodules}; do dir=$ZIM_HOME/modules/${${${zmodule%/}%.git}##*/} if [ -d ${dir} ]; then - print "${zmodule} is already installed" + print "\n${zmodule} module is already installed" else arr=("${(@s|/|)${zmodule%/}}") if [ ${#arr} = 1 ]; then @@ -16,7 +16,9 @@ for zmodule in ${zmodules}; do else repo=${zmodule} fi + print "\nInstalling ${zmodule} module" GIT_ASKPASS=/bin/echo git clone --recursive ${repo} ${dir} 2> /dev/null \ - && print "${zmodule} got installed" || print "${repo} could not be installed" + || print "${repo} module could not be installed" fi done +print diff --git a/tools/zim_update b/tools/zim_update index 5f064d6..2ce68b4 100644 --- a/tools/zim_update +++ b/tools/zim_update @@ -2,6 +2,7 @@ # zim_update - update the zim repository # +echo "\nUpdating Zim" cd ${ZIM_HOME} # this is the cleanest way I know how to update a repository @@ -18,7 +19,7 @@ for zmodule in ${zmodules}; do dir=${${${zmodule%/}%.git}##*/} if [ -d ${ZIM_HOME}/modules/${dir} ]; then - echo "\nUpdating ${zmodule} module." + print "\nUpdating ${zmodule} module" cd ${ZIM_HOME}/modules/${dir} # update the modules repository @@ -29,6 +30,7 @@ for zmodule in ${zmodules}; do git submodule update --init --recursive else - print "No such module \"${zmodule}\", run \"zmanage install\" to install missing modules" >&2 + print "\nNo such module \"${zmodule}\", run \"zmanage install\" to install missing modules" >&2 fi done +print