Submitted by: Submitted by Shabbypenguin
Views: 185
Words: 341
Pages: 2
Category: Science and Technology
Date Submitted: 12/20/2012 06:19 PM
#############################################################################
###### Compile Script - Created by Shabbypenguin, improved by many ##########
#############################################################################
#!/bin/bash
# Lets set some exports
# Goo Exports
DEV=Shabbypenguin
PRODUCT=$1
ROM=Blackbean
VERSION=$(date +%Y%m%d)
FOLDER=$PRODUCT"-"$ROM
# Build Exports
THREADS=$(expr 2 + $(grep processor /proc/cpuinfo | wc -l))
MAKE="make -j${THREADS}"
DIR=~/android/$ROM
DONE=$DIR/done
TEMP=$DONE/TEMP
LOG=$DONE/logging.txt
OUT=$DIR/out/target/product/$PRODUCT
UPLOAD=Shabbypenguin@upload.goo.im:public_html/$FOLDER
export TZ=":America/New_York"
NOW=`date +%m-%d`
# Make sure things are in order
rm -rf $DONE
[ -d "$TEMP" ] || mkdir -p "$TEMP"
exec > >(tee $DONE/buildlog.txt) 2>&1
echo "Staring at" > $LOG && date >> $LOG && echo "" >> $LOG
# Always clean up your messes
$MAKE installclean
$MAKE clobber
# Start the good stuff
echo "gettin good" >> $LOG && date >> $LOG && echo "" >> $LOG
# Get things up to date :)
repo sync -j$THREADS
echo "this is how long it takes to repo sync" >> $LOG && date >> $LOG && echo "" >> $LOG
# Lets start buildin
. build/envsetup.sh
brunch $PRODUCT
echo "this is how long it takes to compile" >> $LOG && date >> $LOG && echo "" >> $LOG
# Adding goo's
cp $OUT/*UNOFFICIAL*.zip $DONE/$ROM"-Copied.zip"
unzip $DONE/*.zip -d $TEMP
rm $DONE/*-Copied.zip
echo -e "\\n" >> $TEMP/system/build.prop
echo "# Goo-Manager Info" >> $TEMP/system/build.prop
echo "ro.goo.developerid="$DEV >> $TEMP/system/build.prop
echo "ro.goo.rom="$ROM >> $TEMP/system/build.prop
echo "ro.goo.version="$VERSION >> $TEMP/system/build.prop
echo "ro.goo.board="$PRODUCT >> $TEMP/system/build.prop...