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 |
what kind of installation is it? Some sort of package based, etc?
|
Yeah it is package based and the user has options to select the packages.
Regards, Murugesan |
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 |
>> compiling:
Yeah this is !! |
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:19 AM. |