<commit_before>#!/bin/bash
#
# Utility functions for the Skia GCE setup scripts.
#
# Copyright 2014 Google Inc. All Rights Reserved.
# Author: <EMAIL> (<NAME>)


function install_packages {
  echo
  echo "Install Required packages"
  $GCOMPUTE_CMD ssh --ssh_user=$PROJECT_USER $INSTANCE_NAME \
    "sudo dpkg --add-architecture i386 && sudo apt-get update && " \
    "sudo apt-get -y install haveged python-django openjdk-7-jre-headless zlib1g-dev:i386 libgif-dev:i386 libpng12-dev:i386 fontconfig:i386 libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 ccache g++-multilib libpoppler-cpp-dev libpoppler-cpp0:i386 && " \
    "sudo cp /usr/lib/i386-linux-gnu/libpng.so /usr/lib32/ && " \
    "sudo cp /usr/lib/i386-linux-gnu/libpng12.so.0 /usr/lib32/ && " \
    "sudo apt-get -y install libpng12-dev libgtk2.0-dev ant clang-3.4 openjdk-7-jdk realpath libqt4-dev-bin libqt4-core libqt4-gui libqt4-dev:i386 icewm libdrm-dev doxygen && " \
    "sudo apt-get -y remove python-zope.interface && " \
    "sudo easy_install zope.interface" \
    || FAILED="$FAILED InstallPackages"
  echo
}

function setup_symlinks {
  echo
  echo "Setup Symlinks"
  $GCOMPUTE_CMD ssh --ssh_user=$PROJECT_USER $INSTANCE_NAME \
    "ln -s -f ~/storage/skia-repo/src/third_party/llvm-build/Release+Asserts/bin/ ~/slavebin && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/cc && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/c++ && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/gcc && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/g++ && " \
    "sudo ln -s -f /usr/lib/i386-linux-gnu/libfontconfig.so.1 /usr/lib32/libfontconfig.so && " \
    "sudo ln -s -f /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/lib32/libfreetype.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/libgif.so.4.1.6 /usr/lib/x86_64-linux-gnu/libgif.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/libGLU.so.1 /usr/lib/x86_64-linux-gnu/libGLU.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtCore.so.4 /usr/lib/x86_64-linux-gnu/libQtCore.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtGui.so.4 /usr/lib/x86_64-linux-gnu/libQtGui.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 /usr/lib/x86_64-linux-gnu/libQtOpenGL.so && " \
    "sudo ln -s /home/default/storage/skia-repo /home/chrome-bot && " \
    "sudo ln -s /usr/lib/i386-linux-gnu/libpoppler-cpp.so.0 /usr/lib/i386-linux-gnu/libpoppler-cpp.so && " \
    "sudo ln -s /home/chrome-bot/skia-repo/android-sdk-linux /home/chrome-bot/android-sdk-linux && " \
    "sudo ln -s /home/chrome-bot/skia-repo/nacl_sdk /home/chrome-bot/nacl_sdk && " \
    "sudo rm /usr/bin/moc && sudo ln -s /usr/bin/moc-qt4 /usr/bin/moc && " \
    "sudo rm -rf /usr/bin/qmake && sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake && " \<commit_msg>Add google-api-python-client to buildbot GCE setup<commit_after>#!/bin/bash
#
# Utility functions for the Skia GCE setup scripts.
#
# Copyright 2014 Google Inc. All Rights Reserved.
# Author: <EMAIL> (<NAME>)


function install_packages {
  echo
  echo "Install Required packages"
  $GCOMPUTE_CMD ssh --ssh_user=$PROJECT_USER $INSTANCE_NAME \
    "sudo dpkg --add-architecture i386 && sudo apt-get update && " \
    "sudo apt-get -y install haveged python-django openjdk-7-jre-headless zlib1g-dev:i386 libgif-dev:i386 libpng12-dev:i386 fontconfig:i386 libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 ccache g++-multilib libpoppler-cpp-dev libpoppler-cpp0:i386 && " \
    "sudo cp /usr/lib/i386-linux-gnu/libpng.so /usr/lib32/ && " \
    "sudo cp /usr/lib/i386-linux-gnu/libpng12.so.0 /usr/lib32/ && " \
    "sudo apt-get -y install libpng12-dev libgtk2.0-dev ant clang-3.4 openjdk-7-jdk realpath libqt4-dev-bin libqt4-core libqt4-gui libqt4-dev:i386 icewm libdrm-dev doxygen && " \
    "sudo apt-get -y remove python-zope.interface && " \
    "sudo easy_install zope.interface" \
    "sudo pip install --upgrade google-api-python-client" \
    || FAILED="$FAILED InstallPackages"
  echo
}

function setup_symlinks {
  echo
  echo "Setup Symlinks"
  $GCOMPUTE_CMD ssh --ssh_user=$PROJECT_USER $INSTANCE_NAME \
    "ln -s -f ~/storage/skia-repo/src/third_party/llvm-build/Release+Asserts/bin/ ~/slavebin && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/cc && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/c++ && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/gcc && " \
    "sudo ln -s -f /usr/bin/ccache /usr/local/bin/g++ && " \
    "sudo ln -s -f /usr/lib/i386-linux-gnu/libfontconfig.so.1 /usr/lib32/libfontconfig.so && " \
    "sudo ln -s -f /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/lib32/libfreetype.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/libgif.so.4.1.6 /usr/lib/x86_64-linux-gnu/libgif.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so && " \
    "sudo ln -s -f /usr/lib/x86_64-linux-gnu/libGLU.so.1 /usr/lib/x86_64-linux-gnu/libGLU.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtCore.so.4 /usr/lib/x86_64-linux-gnu/libQtCore.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtGui.so.4 /usr/lib/x86_64-linux-gnu/libQtGui.so && " \
    "sudo ln -s /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 /usr/lib/x86_64-linux-gnu/libQtOpenGL.so && " \
    "sudo ln -s /home/default/storage/skia-repo /home/chrome-bot && " \
    "sudo ln -s /usr/lib/i386-linux-gnu/libpoppler-cpp.so.0 /usr/lib/i386-linux-gnu/libpoppler-cpp.so && " \
    "sudo ln -s /home/chrome-bot/skia-repo/android-sdk-linux /home/chrome-bot/android-sdk-linux && " \
    "sudo ln -s /home/chrome-bot/skia-repo/nacl_sdk /home/chrome-bot/nacl_sdk && " \
    "sudo rm /usr/bin/moc && sudo ln -s /usr/bin/moc-qt4 /usr/bin/moc && " \
    "sudo rm -rf /usr/bin/qmake && sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake && " \
{'fraction_non_alphanumeric': 0.1778118087459588, 'fraction_numerical': 0.0473030457716522, 'mean_word_length': 2.713202779532533, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '4549065', 'n_tokens_mistral': 2729, 'n_tokens_neox': 2487, 'n_words': 432}