Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # mybuild2.sh
- # my custom script to build and flash
- # note the start time
- START=$(date +%s)
- # change to top of build directory
- cd ~/android/system
- # clean 1st if called
- OPTION="$1"
- case "$OPTION" in
- clean)
- make clean
- rm -rf ./out
- esac
- # prepare and build for my stupid system, including kernel ;)
- # change to kernel directory and build kernel
- cd ~/android/system/kernel/samsung/aries && ./build.sh captivatemtd
- # change to top of build directory and build, using ccache to speed things up
- cd ~/android/system && . build/envsetup.sh && USE_CCACHE=1 brunch captivatemtd
- # push zip to connected phone and flash
- eat
- # calculate and show elapsed time
- END=$(date +%s)
- ELAPSED=$((END - START))
- E_MIN=$((ELAPSED / 60))
- E_SEC=$((ELAPSED - E_MIN * 60))
- printf "Elapsed: "
- [ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN
- printf "%d sec(s)\n" $E_SEC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement