From 1bbd01a9837c5a4297e53701055a309593945fa1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Oct 2021 13:43:58 +0200 Subject: Update intro scripts --- intro2-tldr | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'intro2-tldr') diff --git a/intro2-tldr b/intro2-tldr index ee1f487..6fd2d09 100755 --- a/intro2-tldr +++ b/intro2-tldr @@ -15,15 +15,28 @@ function error () { echo "$*" 1>&2; exit 1; } tmp=/tmp show=y +# Keep in sync with *-tour. +# function show () # ... { if [ $show = "y" ]; then echo echo "+ $*" - "${@}" - else - "${@}" fi + + local p=("$1") + + if [ "$1" = b -o "$1" = bpkg -o "$1" = bdep ]; then + p+=(--no-progress) + fi + + if [ "$1" = tree ]; then + p+=(-n) # No color. + fi + + shift + + "${p[@]}" "${@}" } cd "$tmp" @@ -39,7 +52,7 @@ git add . git commit -m "first commit" cd .. -show git clone file://$tmp/hello.git +show git clone --no-progress file://$tmp/hello.git show tree hello show cd hello @@ -64,7 +77,7 @@ show b sed -i -re 's/#v1.0.0//' repositories.manifest show bdep fetch -bdep sync +bdep sync --no-progress show bdep status -i show bdep sync libhello -- cgit v1.1