<commit_before>#!/bin/sh
# Copyright 2012 <NAME>. All Rights Reserved. Use of this
# source code is governed by a BSD-style license that can be found in the
# LICENSE file.

set -e

OUT="$HOME/src/golang"
echo "Installing Go in $OUT"
if [ -d "$OUT" ]; then
  cd "$OUT"
  hg pull
else
  hg clone https://code.google.com/p/go/ "$OUT"
  cd "$OUT"
fi

TAG="$(hg tags | grep go | head -n 1 | cut -f 1 -d ' ')"
echo "Using $TAG"
hg co $TAG

echo "Building."
cd src
./all.bash<commit_msg>Update install_golang.sh to use git.<commit_after>#!/bin/sh
# Copyright 2012 <NAME>. All Rights Reserved. Use of this
# source code is governed by a BSD-style license that can be found in the
# LICENSE file.

set -e

OUT="$HOME/src/golang"
echo "Installing Go in $OUT"
if [ -d "$OUT" ]; then
  cd "$OUT"
  git fetch --all
else
  git clone https://go.googlesource.com/go "$OUT"
  cd "$OUT"
fi

TAG="$(git tag | grep "^go" | egrep -v "beta|rc" | tail -n 1)"
echo "Using $TAG"
git checkout $TAG

echo "Building."
cd src
./all.bash
{'fraction_non_alphanumeric': 0.15178571428571427, 'fraction_numerical': 0.010912698412698412, 'mean_word_length': 3.2394957983193278, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5877070', 'n_tokens_mistral': 395, 'n_tokens_neox': 360, 'n_words': 147}