<commit_before>#!/bin/sh

#  build.sh
#  WebRTC
#
#  Created by <NAME> on 6/18/14.
#  Copyright (c) 2014 Pristine, Inc. All rights reserved.

# Get location of the script itself .. thanks SO ! http://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
    DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
    SOURCE="$(readlink "$SOURCE")"
    [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
PROJECT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

DEFAULT_WEBRTC_URL="https://chromium.googlesource.com/external/webrtc"
DEFAULT_POD_URL="https://s3.amazonaws.com/libjingle"
WEBRTC="$PROJECT_DIR/webrtc"
DEPOT_TOOLS="$PROJECT_DIR/depot_tools"
BUILD="$WEBRTC/libjingle_peerconnection_builds"
WEBRTC_TARGET="libWebRTC_objc"
MAC_SDK="10.8"

function create_directory_if_not_found() {
    if [ ! -d "$1" ];
    then
        mkdir -v "$1"
    fi
}

function exec_libtool() {
  echo "Running libtool"
  libtool -static -v -o $@
}

function exec_strip() {
  echo "Running strip"
  strip -S -X $@
}

function exec_ninja() {
  echo "Running ninja"
  ninja -C $1 $WEBRTC_TARGET
}

create_directory_if_not_found "$PROJECT_DIR"
create_directory_if_not_found "$WEBRTC"

# Update/Get/Ensure the Gclient Depot Tools
function pull_depot_tools() {<commit_msg>SDK 10.8 has bugs with some webrtc code. upping the compile sdk can fix this issue<commit_after>#!/bin/sh

#  build.sh
#  WebRTC
#
#  Created by <NAME> on 6/18/14.
#  Copyright (c) 2014 Pristine, Inc. All rights reserved.

# Get location of the script itself .. thanks SO ! http://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
    DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
    SOURCE="$(readlink "$SOURCE")"
    [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
PROJECT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

DEFAULT_WEBRTC_URL="https://chromium.googlesource.com/external/webrtc"
DEFAULT_POD_URL="https://s3.amazonaws.com/libjingle"
WEBRTC="$PROJECT_DIR/webrtc"
DEPOT_TOOLS="$PROJECT_DIR/depot_tools"
BUILD="$WEBRTC/libjingle_peerconnection_builds"
WEBRTC_TARGET="libWebRTC_objc"
MAC_SDK="10.9"

function create_directory_if_not_found() {
    if [ ! -d "$1" ];
    then
        mkdir -v "$1"
    fi
}

function exec_libtool() {
  echo "Running libtool"
  libtool -static -v -o $@
}

function exec_strip() {
  echo "Running strip"
  strip -S -X $@
}

function exec_ninja() {
  echo "Running ninja"
  ninja -C $1 $WEBRTC_TARGET
}

create_directory_if_not_found "$PROJECT_DIR"
create_directory_if_not_found "$WEBRTC"

# Update/Get/Ensure the Gclient Depot Tools
function pull_depot_tools() {
{'fraction_non_alphanumeric': 0.14416243654822336, 'fraction_numerical': 0.016582064297800337, 'mean_word_length': 4.24113475177305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3770460', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1064, 'n_words': 279}