<commit_before>#!/bin/sh
# Autogeneration script, run this script to set up the
# project. Note that you must have ANDROID_SDK set. You 
# also need ANDROID_NDK set if you are using native code.

# This script must run from the PROJECT_DIR or it will fail.

# Retrieve PROJECT_DIR
PROJECT_DIR="$(dirname $0)"

# Adjust these vars to fit your project
PROJECT_NAME="HelloWorld"
PROJECT_TARGET="1"

# Where we install our libraries
LIB_DIR=$PROJECT_DIR/libs

# If ANDROID_SDK is not already set, set it to this default.
# NOTE:	Alter this if you have a different default location.
if [ -z "$ANDROID_SDK" ]; then
	# Change ANDROID_SDK below to the path of your SDK
	export ANDROID_SDK=$HOME/Android/SDK	#This is a symbolic link to the SDK on my system
fi

# Set the android command
ANDROID_CMD=$ANDROID_SDK/tools/android

# Verify that the android tool exists and error if unavailable
if [ ! -x "$ANDROID_CMD" ]; then
	echo "ERROR: android sdk is unavailable."
	echo "Be sure you've downloaded the sdk and that the ANDROID_SDK environment"
	echo "variable is set to the unzipped sdk directory."
	exit 1
fi

# Locations of support libraries we need from the sdk
LIB_APPCOMPAT_SRC_DIR=$ANDROID_SDK/extras/android/support/v7/appcompat
LIB_APPCOMPAT_INST_DIR=$LIB_DIR/appcompat

# Verify that appcompat library exists and error if unavailable
if [ ! -d "$LIB_APPCOMPAT_SRC_DIR" ]; then
	echo "ERROR: appcompat libraries unavailable."
	echo "Be sure you've installed the support libraries and repositories using"
	echo "the android sdk manager."
	exit 1
fi

# For jni projects we also need the ndk
if [ -d "$PROJECT_DIR/jni" ]; then
	# If ANDROID_NDK is not already set, set it to this default.
	# NOTE:	Alter this if you have a different default location.
	if [ -z "$ANDROID_NDK" ]; then
		# Change ANDROID_NDK below to the path of your NDK
		export ANDROID_NDK=$HOME/Android/NDK	#This is a symbolic link to the NDK on my system
	fi

	# Set the ndk-build command
	NDK_BUILD_CMD=$ANDROID_NDK/ndk-build

	# Verify that the ndk-build cool exists and error if unavailable
	if [ ! -x "$NDK_BUILD_CMD" ]; then
		echo "ERROR: ndk-build is unavailable."
		echo "This package contains jni code which must be compiled using ndk-build."
		echo "Be sure you've downloaded the ndk and that the ANDROID_NDK environment"
		echo "variable is set to the unzipped ndk"
		exit 1
	fi

	# Let's go ahead and build our native sources now
	$NDK_BUILD_CMD
fi

# If there is no libs directory, make it now
if [ ! -d  "$LIB_DIR" ]; then
	mkdir $PROJECT_DIR/libs
fi

# Obtain the appcompat library that this project needs;
# you must have these installed within your SDK.
cp -R $LIB_APPCOMPAT_SRC_DIR $LIB_DIR

# Update the appcompat lib so we can use its resources<commit_msg>removed ndk-build execution in autogen.sh<commit_after>#!/bin/sh
# Autogeneration script, run this script to set up the
# project. Note that you must have ANDROID_SDK set. You 
# also need ANDROID_NDK set if you are using native code.

# This script must run from the PROJECT_DIR or it will fail.

# Retrieve PROJECT_DIR
PROJECT_DIR="$(dirname $0)"

# Adjust these vars to fit your project
PROJECT_NAME="HelloWorld"
PROJECT_TARGET="1"

# Where we install our libraries
LIB_DIR=$PROJECT_DIR/libs

# If ANDROID_SDK is not already set, set it to this default.
# NOTE:	Alter this if you have a different default location.
if [ -z "$ANDROID_SDK" ]; then
	# Change ANDROID_SDK below to the path of your SDK
	export ANDROID_SDK=$HOME/Android/SDK	#This is a symbolic link to the SDK on my system
fi

# Set the android command
ANDROID_CMD=$ANDROID_SDK/tools/android

# Verify that the android tool exists and error if unavailable
if [ ! -x "$ANDROID_CMD" ]; then
	echo "ERROR: android sdk is unavailable."
	echo "Be sure you've downloaded the sdk and that the ANDROID_SDK environment"
	echo "variable is set to the unzipped sdk directory."
	exit 1
fi

# Locations of support libraries we need from the sdk
LIB_APPCOMPAT_SRC_DIR=$ANDROID_SDK/extras/android/support/v7/appcompat
LIB_APPCOMPAT_INST_DIR=$LIB_DIR/appcompat

# Verify that appcompat library exists and error if unavailable
if [ ! -d "$LIB_APPCOMPAT_SRC_DIR" ]; then
	echo "ERROR: appcompat libraries unavailable."
	echo "Be sure you've installed the support libraries and repositories using"
	echo "the android sdk manager."
	exit 1
fi

# For jni projects we also need the ndk
if [ -d "$PROJECT_DIR/jni" ]; then
	# If ANDROID_NDK is not already set, set it to this default.
	# NOTE:	Alter this if you have a different default location.
	if [ -z "$ANDROID_NDK" ]; then
		# Change ANDROID_NDK below to the path of your NDK
		export ANDROID_NDK=$HOME/Android/NDK	#This is a symbolic link to the NDK on my system
	fi

	# Set the ndk-build command
	NDK_BUILD_CMD=$ANDROID_NDK/ndk-build

	# Verify that the ndk-build cool exists and error if unavailable
	if [ ! -x "$NDK_BUILD_CMD" ]; then
		echo "ERROR: ndk-build is unavailable."
		echo "This package contains jni code which must be compiled using ndk-build."
		echo "Be sure you've downloaded the ndk and that the ANDROID_NDK environment"
		echo "variable is set to the unzipped ndk"
		exit 1
	fi
fi

# If there is no libs directory, make it now
if [ ! -d  "$LIB_DIR" ]; then
	mkdir $PROJECT_DIR/libs
fi

# Obtain the appcompat library that this project needs;
# you must have these installed within your SDK.
cp -R $LIB_APPCOMPAT_SRC_DIR $LIB_DIR

# Update the appcompat lib so we can use its resources
{'fraction_non_alphanumeric': 0.06925055106539309, 'fraction_numerical': 0.002204261572373255, 'mean_word_length': 4.250723240115718, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2161102', 'n_tokens_mistral': 1845, 'n_tokens_neox': 1765, 'n_words': 753}