Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- device=(d855 d850 d851 d852 ls990 vs985 klte klteusc hlte jfltexx m8 endeavoru peregrine ghost shamu titan victara)
- if [ ! -d ".repo" ]; then
- echo -e ${red}"No .repo directory found. Is this an Android build tree?"${txtrst}
- exit 1
- fi
- if [ ! -d "vendor/crdroid" ]; then
- echo -e ${red}"No vendor/crdroid directory found. Is this a crdroid build tree?"${txtrst}
- exit 1
- fi
- # get OS (linux / Mac OS x)
- IS_DARWIN=$(uname -a | grep Darwin)
- if [ -n "$IS_DARWIN" ]; then
- CPUS=$(sysctl hw.ncpu | awk '{print $2}')
- DATE=gdate
- else
- CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
- DATE=date
- fi
- opt_jobs="$CPUS"
- for i in "${device[@]}"
- do
- device=$i
- # setup environment
- echo -e "Setting up environment"
- . build/envsetup.sh
- # Remove system folder (this will create a new build.prop with updated build time and date)
- rm -rf out/target/product/$device/system/
- # lunch device
- echo -e ""
- echo -e "Lunching device"
- lunch "crdroid_$device-userdebug";
- echo -e ""
- echo -e "Starting compilation"
- make -j"$opt_jobs" crdroid
- echo -e ""
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement