Total Progress over entire bash shell script
0
votes
1
answer
1070
views
EDIT FOR CLARITY :
say I have the following script (let's posit pv and curl are already installed) :
(that currently runs under ubuntu but that I plan to make POSIX-compliant so that it may run on more linux ditributions)
#!/bin/bash
sudo apt install vlc
mkdir -p ~/.steam/compatibilitytools.d
PROTONVERSIONNUMBER=$(curl -v --silent https://api.github.com/repos/popsUlfr/Proton/releases 2>&1 | grep "tag_name" | head -n 1 | cut -f4,4 -d"\"")
REPLACING=$(curl -v --silent https://api.github.com/repos/popsUlfr/Proton/releases 2>&1 | grep "target_commitish" | head -n 1 | cut -f4,4 -d"\"" | sed "s/[^_]\+/\L\u&/g")
PROTONVERSION=${REPLACING/_G/-6_G}
PROTONNAME=$PROTONVERSION"_"${PROTONVERSIONNUMBER##*-}
wget https://github.com/popsUlfr/Proton/releases/download/$PROTONVERSIONNUMBER/$PROTONNAME.tar.xz
pv $PROTONNAME.tar.xz | tar xp -J -C ~/.steam/compatibilitytools.d
rm $PROTONNAME.tar.xz
I get three progress bars, these progress bars seem very beautiful to me :
the way they're accurate and stuff, I dunno call me a weirdo
QUESTION
------
How do I utilize the power of these three seperate progress bars to form one continuous progress bar that respects currents progress bar "speeds" of the underlying "true" progress bars?
Asked by tatsu
(306 rep)
Mar 8, 2019, 10:33 AM
Last activity: Mar 8, 2019, 02:14 PM
Last activity: Mar 8, 2019, 02:14 PM