Codebase list mksh / 3fcb94b
ensure everything is updated from upstream mirabilos authored 3 years ago mirabilos committed 3 years ago
3 changed file(s) with 14 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 mksh (59b-4) UNRELEASED; urgency=medium
1
2 * New upstream snapshot
0 mksh (59c-1) unstable; urgency=medium
1
2 * “Blue moon on Samhain” upload
3 * New upstream release
34 - [tg] Update character widths (Jamo bugfix)
45 - [spellintian] Fixes
56 - [Jonathan Perkin] Don’t use “test -e” in Build.sh
3031 - [tg] Demote some (unlikely called) output code to !MKSH_SMALL
3132 * Drop -o from lo alias as coreutils’ ls(1) does not implement
3233 the option the same as BSD
33
34 -- Thorsten Glaser <tg@mirbsd.de> Sat, 31 Oct 2020 05:56:20 +0100
34 * Update “the Uhr” from MirBSD CVS
35 - tg: sync with progress-bar,v 1.6
36
37 -- Thorsten Glaser <tg@mirbsd.de> Sat, 31 Oct 2020 06:49:43 +0100
3538
3639 mksh (59b-3) unstable; urgency=medium
3740
11 Sat, 28 May 2005 22:02:17 +0000.
22
33 It was downloaded from:
4 https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R59b.tgz
4 https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R59c.tgz
55
66
77 Licence:
00 #!/bin/mksh
11 # -*- mode: sh -*-
2 # $MirOS: contrib/hosted/tg/uhr,v 1.22 2020/04/13 16:05:19 tg Exp $
2 # $MirOS: contrib/hosted/tg/uhr,v 1.23 2020/05/19 22:21:45 tg Exp $
33 #-
44 # Copyright © 2012, 2013, 2015, 2017, 2018, 2020
55 # mirabilos <m@mirbsd.org>
112112 function draw_progress_bar_internal {
113113 local bar num w=$COLUMNS pct
114114
115 ((# num = (_cur_progress_bar * w * 8) / _cnt_progress_bar ))
116 ((# pct = _cur_progress_bar * 100 / _cnt_progress_bar ))
115 ((# (num = (_cur_progress_bar * w * 8) / _cnt_progress_bar), 1 ))
116 ((# (pct = _cur_progress_bar * 100 / _cnt_progress_bar), 1 ))
117117 [[ $_cch_progress_bar != $num.$pct ]] || return 0
118118 while ((# num >= 8 )); do
119119 bar+=█
120 ((# num -= 8 ))
120 ((# (num -= 8), 1 ))
121121 done
122122 case $num {
123123 (7) bar+=▉ ;;
131131 # fill complete line, right-align completion percentage display
132132 local -R$w spc="$pct%"
133133 # elide percentage when it stops fitting
134 ((# (_cur_progress_bar * w / _cnt_progress_bar) > (w - 4) )) && spc=
134 ((# (_cur_progress_bar * w / _cnt_progress_bar) <= (w - 4) )) || spc=
135135 # save position; go to last line; set colours;
136136 # output a line full of spaces (and completion percentage);
137137 # jump to first column; output bar (line præfix); restore position