techmik

my newest buildscript

Sep 4th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.99 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. # assign variables
  14. OPTION="$1"
  15.  
  16. # clean 1st if called
  17. case "$OPTION" in
  18.     clean)
  19.         make clean
  20.     rm -rf ./out
  21. esac
  22.  
  23. # get rom manager
  24. cd vendor/cyanogen
  25. ./get-rommanager
  26.  
  27. # prepare to build kernel
  28. cd ~/android/system && . build/envsetup.sh && lunch cyanogen_captivatemtd-eng
  29.  
  30. # change to kernel directory and build kernel
  31. cd ~/android/system/kernel/samsung/aries && ./build.sh captivatemtd
  32.  
  33. # change to top of build directory and build, using ccache to speed things up
  34. cd ~/android/system && USE_CCACHE=1 brunch captivatemtd
  35.  
  36. # push zip to connected phone and flash
  37. eat
  38.  
  39. # calculate and show elapsed time
  40. END=$(date +%s)
  41. ELAPSED=$((END - START))
  42. E_MIN=$((ELAPSED / 60))
  43. E_SEC=$((ELAPSED - E_MIN * 60))
  44. printf "Elapsed: "
  45. [ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN
  46. printf "%d sec(s)\n" $E_SEC
Advertisement
Add Comment
Please, Sign In to add comment