ensure everything is updated from upstream
mirabilos authored 3 years ago
mirabilos committed 3 years ago
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
|
3 | 4 |
- [tg] Update character widths (Jamo bugfix)
|
4 | 5 |
- [spellintian] Fixes
|
5 | 6 |
- [Jonathan Perkin] Don’t use “test -e” in Build.sh
|
|
30 | 31 |
- [tg] Demote some (unlikely called) output code to !MKSH_SMALL
|
31 | 32 |
* Drop -o from lo alias as coreutils’ ls(1) does not implement
|
32 | 33 |
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
|
35 | 38 |
|
36 | 39 |
mksh (59b-3) unstable; urgency=medium
|
37 | 40 |
|
1 | 1 |
Sat, 28 May 2005 22:02:17 +0000.
|
2 | 2 |
|
3 | 3 |
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
|
5 | 5 |
|
6 | 6 |
|
7 | 7 |
Licence:
|
0 | 0 |
#!/bin/mksh
|
1 | 1 |
# -*- 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 $
|
3 | 3 |
#-
|
4 | 4 |
# Copyright © 2012, 2013, 2015, 2017, 2018, 2020
|
5 | 5 |
# mirabilos <m@mirbsd.org>
|
|
112 | 112 |
function draw_progress_bar_internal {
|
113 | 113 |
local bar num w=$COLUMNS pct
|
114 | 114 |
|
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 ))
|
117 | 117 |
[[ $_cch_progress_bar != $num.$pct ]] || return 0
|
118 | 118 |
while ((# num >= 8 )); do
|
119 | 119 |
bar+=█
|
120 | |
((# num -= 8 ))
|
|
120 |
((# (num -= 8), 1 ))
|
121 | 121 |
done
|
122 | 122 |
case $num {
|
123 | 123 |
(7) bar+=▉ ;;
|
|
131 | 131 |
# fill complete line, right-align completion percentage display
|
132 | 132 |
local -R$w spc="$pct%"
|
133 | 133 |
# 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=
|
135 | 135 |
# save position; go to last line; set colours;
|
136 | 136 |
# output a line full of spaces (and completion percentage);
|
137 | 137 |
# jump to first column; output bar (line præfix); restore position
|