<commit_before>#!/bin/bash

# Create all of our Travis cached dirs, or, if they exist, loosen their
# permissions enough that our build process is guaranteed to be able to write
# to them and Travis's caching process is guaranteed to be able to read them.
# (Travis caching requires that all cached files be readable, and, I surmise,
# that cached directories be executable, to be traversed).

set -ex

dirs=(
  "${HOME}/.cache"
  "${HOME}/cached-deps"
  "${HOME}/gopath/pkg/mod"
)

for dir in "${dirs[@]}"; do
  if [[ -d "${dir}" ]]; then
    # change ownership on directory, in case it's owned by root
    sudo chown -R ${USER}:${USER} "${dir}"
  else
    # create directory
    mkdir -p "${dir}"
  fi
  # Loosen permissions so build processes can write and Travis can cache
  chmod 777 -R "${dir}"
done<commit_msg>Try fixing perms on the entire gopath<commit_after>#!/bin/bash

# Create all of our Travis cached dirs, or, if they exist, loosen their
# permissions enough that our build process is guaranteed to be able to write
# to them and Travis's caching process is guaranteed to be able to read them.
# (Travis caching requires that all cached files be readable, and, I surmise,
# that cached directories be executable, to be traversed).

set -ex

dirs=(
  "${HOME}/.cache"
  "${HOME}/cached-deps"

  # Fix permissions on the entire $GOPATH. While we only cache `$GOPATH/pkg`,
  # there are permissions issues for the pachyderm code when (which is cloned
  # into $GOPATH/src.)
  "${GOPATH}"
)

for dir in "${dirs[@]}"; do
  if [[ -d "${dir}" ]]; then
    # change ownership on directory, in case it's owned by root
    sudo chown -R ${USER}:${USER} "${dir}"
  else
    # create directory
    mkdir -p "${dir}"
  fi
  # Loosen permissions so build processes can write and Travis can cache
  chmod 777 -R "${dir}"
done
{'fraction_non_alphanumeric': 0.11616438356164384, 'fraction_numerical': 0.0032876712328767125, 'mean_word_length': 3.6227848101265825, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2615632', 'n_tokens_mistral': 584, 'n_tokens_neox': 554, 'n_words': 258}