LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PROGRESS BAR with shell script (https://www.linuxquestions.org/questions/linux-software-2/progress-bar-with-shell-script-265823/)

murugesan 12-13-2004 04:33 AM

PROGRESS BAR with shell script
 
Hi all,

The scenario is

A UNIX SHELL SCRIPT WHILE INSTALLING AN APPLICATION SHOULD DISPLAY A PROGRESS BAR OF HOW MUCH THE THE INSTALLATION IS COMPLETED AS IN WINDOWS ........ (in terms of time) ANY IDEAs????

what are all the factors that i need to consider ?

Thanks for the understanding,
Murugesan

redjokerx 12-13-2004 05:00 AM

what kind of installation is it? Some sort of package based, etc?

murugesan 12-13-2004 05:03 AM

Yeah it is package based and the user has options to select the packages.

Regards,
Murugesan

kamstrup 12-13-2004 05:15 AM

Installing an application with a shell script is kinda broad... What exactly do you mean?

Are we talking rpm's, deb's or compiling from source?

rpm: does it already with 'rpm -ivh mypack.rpm'

deb: impossible as for as i know (there's is a small amount available throught '--status-fd <filedescriptor number>')

compiling: very very hard!

If you're thinking in different lines please specify a bit more...

Cheers

murugesan 12-13-2004 05:38 AM

>> compiling:
Yeah this is !!

addy86 12-13-2004 09:03 AM

It is impossible to base the progress bar on the needed time (since a source file of 2x the size doesn't necessarily need 2x the time to compile), but you can base it on the number of source files already compiled. Just compile a certain file and advance the bar by one.

However, _do not_ do this! Unix users want to have a standardized process when building and installing a software package (i.e. doing a 'configure; make; make install'), it's more important than knowing when it will have finished (it will have finished, when it will have finished :), a progress bar doesn't make it faster). A real Unix user wouldn't even see the progress bar since they do something else in this time.
This is probably one of the main differences between Windows and Unix users: Windows users want a colored surface with everything moving every second, while Unix users want standardized and working programs.


All times are GMT -5. The time now is 04:34 PM.