#!/bin/sh

# only run the script if packages/TestDPC is in the current directory path.
pwd | grep -q "packages/TestDPC$"

# if this failed (returned 1), prompt the user.
if [ $? == 1 ]; then
    echo "Please run this script from the TestDPC project folder."
   exit 1
fi

cd ../../../..
# Assume we are always building TestDpc in linux.
LOCAL_SDK_DIR=prebuilts/fullsdk/linux

echo sdk.dir=$(pwd -P)/$LOCAL_SDK_DIR > 'local.properties'

Add script to generate local.properties file for TestDPC project
Add script to generate local.properties file for TestDPC project

With this script, devs can now import testdpc in 
android studio with the proper SDK easily.

The idea is borrowed from
https://cs.corp.google.com/android/vendor/unbundled_google/packages/Finsky/tools/setupgradle.sh

Bug: 28032245
Change-Id: I34e5608bc195a0e1b39183f54dbcec8c1a7e545e
