Is it possible for dialog gauge to track an install

Chris

I'm currently using the --gauge option of dialog to increment a progress bar as a few tasks are completed eg:

( 
  echo 20; echo "XXX"; echo "Task 1"; echo "XXX" ; #Task 1 here
  sleep 2 ; 
  echo 40; echo "XXX"; echo "Task 2"; echo "XXX" ; #Task 2 here
  sleep 2 ; 
  echo 60; echo "XXX"; echo "Task 3"; echo "XXX" ; #Task 3 here
  sleep 2 ;  
  echo 80; echo "XXX"; echo "Task 4"; echo "XXX" ; #Task 4 here
  sleep 2 ; 
  echo 100; echo "XXX"; echo "Task 5"; echo "XXX" ; #Task 5 here
) | dialog --gauge "Performing Tasks" 6 50

What I also would like to do is use --gauge to show progress of a command that starts an install (sudo ./retropie_packages.sh pegasus-fe).

It seems that as I don't have individual tasks like in the above that approach will not work. I've seen pv suggested for such a thing but cannot figure out how to pipe my task through it.

Any ideas/suggestions welcome.

Chris

Probably not the correct way to do it but I ended up doing this:

test=0
sudo ./retropie_packages.sh pegasus-fe |
while IFS= read i; do
((++stepscomplete))
percentcomplete=$((stepscomplete*3))
if [ $percentcomplete-lt 100 ]
then
echo $percentcomplete| dialog --hline "  TEXT  " --backtitle "TESTING..." --gauge "Installing Pegasus" 6 50
else
echo 100 | dialog --hline "  TEXT  " --backtitle "TESTING..." --gauge "Installing Pegasus" 6 50
fi
done

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Get stderr after redirecting output to dialog gauge

Display the sum of track values in activity gauge inner radius while rendering

Plotly Gauge - Possible to turn off Value in center?

Is it possible to track the terminal command of a user

Is dialog with background audio possible?

Is to possible to delay the needle loading animation in Highcharts angular gauge?

Is it possible to extract the dialogue in a video track using the subtitles track with ffmpeg?

How to develop dialog gauge in tcl / tk that gets loop value and updates in scale widget by moving it

Customise Sharing Intent Dialog Is That Possible?

Is it possible to disable shadow/overlay on dialog?

Ubuntu install stuck on formatting dialog

Is it possible to track a specific folder on a remote with GIT?

Is it possible to track down which expression caused an NPE?

Would it be possible to track another android device

Is it possible to get a "track length list" from Audacity?

Is it possible to get track previews using MusicKit

Is it possible to track the stack height / recursion depth reliably?

Is it possible to track incoming and outgoing internet packages

Is it possible to track views of a model view, if the view is cached?

Is it possible to track objects in ARKit like in Vuforia?

Is it possible to track row updates on a Cassandra node?

Is is possible to keep track of the current number of instances of a class?

Is it possible to track changes to Entity Metadata in Dynamics CRM?

is it possible to track processes in windows with electron js?

Is it possible to track kilometers covered in realtime using flutter?

Is it possible to track a face and render it in RealityKit ARView?

Is it possible to track the smtp host by code in java?

How to track app install from snapchat ads

Google Tag Manager & Oracle APEX : Track close dialog