Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while [ "$1" != "" ]; do
- case $1 in
- -s | --sync ) shift
- SYNC_REPO="true"
- ;;
- -c | --clobber ) shift
- CLOBBER_REPO="true"
- ;;
- -h | --help ) echo " -s or --sync to repo sync, -c or --clobber to clean entire repo, -h or --help to display this help dialog"
- exit
- ;;
- * ) echo " -s or --sync to repo sync, -c or --clobber to clean entire repo, -h or --help to display this help dialog"
- exit 1
- esac
- done
- export DATE=$(date +%Y-%m-%d_%H_%M)
- WORKING="/home/bigrushdog/tiamat-aosp"
- OUT=$WORKING/out/target/product/stingray/
- PRODUCT=full_stingray-ota-eng.root.zip
- DEST=/home/bigrushdog/downloads
- cd $WORKING
- if [ "$CLOBBER_REPO" == "true" ]; then
- echo "Cleaning Eos AOSP Repository"
- make clobber
- fi
- if [ "$SYNC_REPO" == "true" ]; then
- echo "Syncing Eos AOSP Repository"
- repo sync
- fi
- echo "Making build environment"
- source build/envsetup.sh
- echo "Ordering full_stingray-eng from lunch menu"
- lunch full_stingray-eng
- echo "Getting compile start time and initializing build"
- START=$(date +%s)
- make -j16 otapackage
- END=$(date +%s)
- DIFF=$(( $END - $START ))
- tmp=$(printf ""%dh:%dm:%ds"\n" $(($DIFF/3600)) $(($DIFF%3600/60)) $(($DIFF%60)))
- echo "Build finished! You compiled AOSP in $tmp"
- echo "Moving output zip and renaming for distro"
- if [ ! -d $DEST ]; then
- mkdir $DEST
- fi
- mv $OUT/$PRODUCT $DEST/full_stingray-ota-$DATE.zip
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment