<commit_before>#!/bin/sh

TARGET=connectedCheck			# Travis is using this for emulator
if [ "x$1" != "x" ]; then
	TARGET=$1			# Let us use whatever
	if [ "$1" = "-r" ]; then	# Release shortcut
		TARGET=assembleRelease
	fi
fi

if [ "x${PARSE_CLIENT_ID}" = "x" ]; then
	. ${HOME}/.parse_sensorama_cred
fi

LIB=app/android/Sensorama/app/libs
mkdir -p $LIB
mkdir -p _tmp
(
	cd _tmp
	wget -O parse.zip https://www.parse.com/downloads/android/Parse/latest
	unzip parse.zip
	mv *.jar ../$LIB
)

F=app/android/Sensorama/app/src/main/java/com/barvoy/sensorama/SRAPIPerms.java
cat $F | \
	sed "s/PARSE_API_ID/${PARSE_API_ID}/" | \
	sed "s/PARSE_CLIENT_ID/${PARSE_CLIENT_ID}/" > _.f
mv _.f $F


(
	cd app/android/Sensorama
	./gradlew build -x lint $TARGET | cat
)<commit_msg>Fix unzipping and only copy necessary libs.<commit_after>#!/bin/sh

TARGET=connectedCheck			# Travis is using this for emulator
if [ "x$1" != "x" ]; then
	TARGET=$1			# Let us use whatever
	if [ "$1" = "-r" ]; then	# Release shortcut
		TARGET=assembleRelease
	fi
fi

if [ "x${PARSE_CLIENT_ID}" = "x" ]; then
	. ${HOME}/.parse_sensorama_cred
fi

LIB=app/android/Sensorama/app/libs
mkdir -p $LIB
mkdir -p _tmp
(
	cd _tmp
	wget -O parse.zip https://www.parse.com/downloads/android/Parse/latest
	unzip -o parse.zip
	cp bolts-android*.jar Parse-*.jar ParseCrash*.jar ../$LIB
)

F=app/android/Sensorama/app/src/main/java/com/barvoy/sensorama/SRAPIPerms.java
cat $F | \
	sed "s/PARSE_API_ID/${PARSE_API_ID}/" | \
	sed "s/PARSE_CLIENT_ID/${PARSE_CLIENT_ID}/" > _.f
mv _.f $F


(
	cd app/android/Sensorama
	./gradlew build -x lint $TARGET | cat
)
{'fraction_non_alphanumeric': 0.16125, 'fraction_numerical': 0.00375, 'mean_word_length': 3.5482954545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2413514', 'n_tokens_mistral': 682, 'n_tokens_neox': 670, 'n_words': 147}