Advertisement
Guest User

Untitled

a guest
May 4th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. # Simulates a build/configuration/installation-like process, using a random message with a nice fake progress, with
  2. # percentage, random total and variable pace. The command does it as many times and as fast as you set in 2 first
  3. # variables (maxsteps and pace). Goes really well with a cup of coffee! ;)
  4.  
  5. # maxsteps = number of steps to run until "finish".
  6. # pace = step increment speed. Lower numbers are faster. 500 works well.
  7. # Arrays a, b and c = word lists. change them as you like, words separated by space.
  8.  
  9. clear; maxsteps=88; pace=500; a=( Tracking Updating Building Compiling Analyzing Saving Optimizing Scanning Checking Loading ); b=( system downloaded core hidden indexed compressed obfuscated scheduled default binary ); c=( files resources dependencies folders socket packages entries library list drivers ); j=0; while (( j < maxsteps )); do ((j++)); echo -n "$j) ${a[$[$RANDOM % ${#a[@]} ]]} ${b[$[$RANDOM % ${#b[@]} ]]} ${c[$[$RANDOM % ${#c[@]} ]]} "; total=$(( 20 + ($RANDOM % 150) )); for i in $(seq 0 $total); do ii=" "$((100*i/total)); echo -n -e ". > [${ii:(-2)}%]\b\b\b\b\b\b\b\b"; s=000$(($RANDOM % pace)); sleep 0.${s:(-3)}; done; echo " ok! "; done; echo -n -e "\nFinished\n\n";
  10.  
  11. ------------------------------------------------------------------------------------------------------------------------------
  12.  
  13. Output example:
  14.  
  15. 1) Scanning indexed socket ............................................. ok!
  16. 2) Optimizing scheduled folders ....................................................................................................................................................................... ok!
  17. 3) Building system files ........................................................................... ok!
  18. 4) Compiling binary resources ....................................................... ok!
  19. 5) Checking scheduled files .................................................................................................................................................................. ok!
  20. 6) Scanning scheduled dependencies .................................................................... ok!
  21. 7) Saving indexed dependencies .................................................................................... ok!
  22. 8) Loading obfuscated list ................................... ok!
  23. 9) Analyzing indexed socket ............ ok!
  24. 10) Updating default library .............................................................................................................................................. ok!
  25. 11) Building scheduled drivers ............................................................... ok!
  26. 12) Optimizing binary dependencies ......................... ok!
  27. 13) Optimizing system entries .............................................................................................................................................................. ok!
  28. 14) Optimizing binary library .................. > [20%]
  29.  
  30. Finished
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement