Skip to content

Instantly share code, notes, and snippets.

@mikecriggs
Last active January 30, 2018 22:02
Show Gist options
  • Save mikecriggs/7cda080e25b16bf2340de2eb57b4b2ec to your computer and use it in GitHub Desktop.
Save mikecriggs/7cda080e25b16bf2340de2eb57b4b2ec to your computer and use it in GitHub Desktop.
Build script
#!/bin/bash
#
# Build script
#
# Definitions
DEVICE="$1"
TIMESTAMP=$(date +"%Y-%m-%d-%S")
ROM=""
# Build logs
# Make a build-logs directory for device
mkdir -p build-logs/$DEVICE
# Remove old build logs
rm -rf build-logs/$DEVICE/*
# Build and send a log to build-logs directory for device
. build/envsetup.sh
lunch $ROM_$DEVICE-userdebug
mka -j32 bacon 2>&1 | tee build-logs/$DEVICE/$ROM_$DEVICE-$TIMESTAMP.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment