TechExhibeo

Legacy Server Build Script

Mar 31st, 2016 (edited)
2,589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This Script OUTDATED. Use latest from below link.
  2.  
  3. https://raw.githubusercontent.com/LegacyServer/Scripts/master/script_build.sh
  4.  
  5.  
  6. #!/bin/bash
  7.  
  8. # Clone this script in your ROM Repo using following commands.
  9. # $ cd rom_repo
  10. # $ curl link > script_build.sh
  11.  
  12. # Some User's Details. Please fill it by your own details.
  13. # Replace "legacy" with your own SSH Username in lowercase
  14. username=legacy
  15.  
  16. # colors
  17. export TERM=xterm
  18.  
  19.     red=$(tput setaf 1)             #  red
  20.     grn=$(tput setaf 2)             #  green
  21.     blu=$(tput setaf 4)             #  blue
  22.     cya=$(tput setaf 6)             #  cyan
  23.     txtrst=$(tput sgr0)             #  Reset
  24. # ccache
  25.  
  26. if [ "$use_ccache" = "yes" ];
  27. then
  28. echo -e ${blu}"CCACHE is enabled for this build" ${txtrst}
  29. export USE_CCACHE=1
  30. export CCACHE_DIR=/home/ccache/$username
  31. prebuilts/misc/linux-x86/ccache/ccache -M 50G
  32. fi
  33.  
  34. if [ "$use_ccache" = "clean" ];
  35. then
  36. export CCACHE_DIR=/home/ccache/$username
  37. ccache -C
  38. wait
  39. echo -e ${grn}"CCACHE Cleared" ${txtrst};
  40. fi
  41.  
  42. # clean
  43. if [ "$make_clean" = "yes" ];
  44. then
  45. make clean && make clobber
  46. wait
  47. echo -e ${cya}"OUT dir from your repo deleted" ${txtrst};
  48. fi
  49.  
  50.  
  51. # build
  52. . build/envsetup.sh
  53. lunch lineage_$device-userdebug
  54. make $target_command -j8
Add Comment
Please, Sign In to add comment