Advertisement
techmik

my buildscript with time added

Sep 2nd, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.90 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # mybuild2.sh
  4.  
  5. # my custom script to build and flash
  6.  
  7. # note the start time
  8. START=$(date +%s)
  9.  
  10. # change to top of build directory
  11. cd ~/android/system
  12.      
  13. # clean 1st if called
  14. OPTION="$1"
  15.  
  16. case "$OPTION" in
  17.     clean)
  18.         make clean
  19.     rm -rf ./out
  20. esac      
  21.    
  22. # prepare and build for my stupid system, including kernel ;)
  23.  
  24. # change to kernel directory and build kernel
  25. cd ~/android/system/kernel/samsung/aries && ./build.sh captivatemtd
  26.  
  27. # change to top of build directory and build, using ccache to speed things up
  28. cd ~/android/system && . build/envsetup.sh && USE_CCACHE=1 brunch captivatemtd
  29.  
  30. # push zip to connected phone and flash
  31. eat
  32.  
  33. # calculate and show elapsed time
  34. END=$(date +%s)
  35. ELAPSED=$((END - START))
  36. E_MIN=$((ELAPSED / 60))
  37. E_SEC=$((ELAPSED - E_MIN * 60))
  38. printf "Elapsed: "
  39. [ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN
  40. printf "%d sec(s)\n" $E_SEC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement