Advertisement
firebird11

fgbfgbgfbdg

Feb 11th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. device=(d855 d850 d851 d852 ls990 vs985 klte klteusc hlte jfltexx m8 endeavoru peregrine ghost shamu titan victara)
  4.  
  5. if [ ! -d ".repo" ]; then
  6. echo -e ${red}"No .repo directory found. Is this an Android build tree?"${txtrst}
  7. exit 1
  8. fi
  9. if [ ! -d "vendor/crdroid" ]; then
  10. echo -e ${red}"No vendor/crdroid directory found. Is this a crdroid build tree?"${txtrst}
  11. exit 1
  12. fi
  13.  
  14. # get OS (linux / Mac OS x)
  15. IS_DARWIN=$(uname -a | grep Darwin)
  16. if [ -n "$IS_DARWIN" ]; then
  17. CPUS=$(sysctl hw.ncpu | awk '{print $2}')
  18. DATE=gdate
  19. else
  20. CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
  21. DATE=date
  22. fi
  23.  
  24. opt_jobs="$CPUS"
  25.  
  26. for i in "${device[@]}"
  27. do
  28.  
  29. device=$i
  30.  
  31. # setup environment
  32. echo -e "Setting up environment"
  33. . build/envsetup.sh
  34.  
  35. # Remove system folder (this will create a new build.prop with updated build time and date)
  36. rm -rf out/target/product/$device/system/
  37.  
  38. # lunch device
  39. echo -e ""
  40. echo -e "Lunching device"
  41. lunch "crdroid_$device-userdebug";
  42.  
  43. echo -e ""
  44. echo -e "Starting compilation"
  45.  
  46. make -j"$opt_jobs" crdroid
  47. echo -e ""
  48.  
  49. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement