Created
July 28, 2012 17:29
-
-
Save JmzTaylor/3194116 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "****Start building****" | |
echo "****Cleaning****" | |
echo -n "would you like to sync yourself? (y/n)? " | |
read que | |
if [ "$que" == "y" ]; then | |
repo sync -j16 | |
else | |
echo "you better be sure" | |
fi | |
echo -n "would you like to clean yourself? (y/n)? " | |
read que | |
if [ "$que" == "y" ]; then | |
make clobber && make clean | |
else | |
echo "you better be sure" | |
fi | |
START=$(date +%s) | |
echo "****Building****" | |
export USE_CCACHE=1 | |
export CCACHE_DIR=ccache/.ccache | |
prebuilt/linux-x86/ccache/ccache -M 20G | |
. build/envsetup.sh | |
brunch primoc | |
echo "****Compile done****" | |
echo "****Signed zip in outfiles****" | |
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 | |
echo -n "would you like to release yourself? (y/n)? " | |
read que | |
if [ "$que" == "y" ]; then | |
echo -n "Is this experimental? (y/n)? " | |
read que | |
if [ "$que" == "y" ]; then | |
cp experiment.sh out/target/product/primoc/experiment.sh | |
out/target/product/primoc/experiment.sh | |
else | |
cp upload.sh out/target/product/primoc/upload.sh | |
out/target/product/primoc/upload.sh | |
fi | |
else | |
echo "ok thanks for playing" | |
fi | |
read -n 1 -p "Press any key to continue" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment