1#!/bin/bash 2 3# Abort on error 4set -e 5 6if [ -z $1 ]; then 7 echo "Error: Please specify output directory"; 8 exit 1 9else 10 echo "Output dir: ~/samples-out/${1}"; 11fi 12 13export GRADLE_OPTS="-Xmx4096m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError" 14export JAVA_OPTS="-Xmx4096m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError" 15export _JAVA_OPTIONS="-Xmx4096m -XX:MaxPermSize=512m -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError" 16 17parallel --joblog emit.log --max-procs 8 --retries 5 -a projects.txt ./emitSample.sh 18 19rsync -avzrt --delete ../../build/out/gradle/ ../../build/prebuilts/gradle 20rm -rf ~/samples-out/$1 || true 21mkdir -p ~/samples-out/$1 22mv ../../build/out/browseable/*.zip ~/samples-out/$1 23rsync -avzrt --delete ../../build/out/browseable/ ../../../development/samples/browseable 24