<commit_before>#!/bin/bash

set -e

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}

<% if_p('env.http_proxy') do |http_proxy| %>
export HTTP_PROXY="<%= http_proxy %>"
export http_proxy="<%= http_proxy %>"
<% end %>

<% if_p('env.https_proxy') do |https_proxy| %>
export HTTPS_PROXY="<%= https_proxy %>"
export https_proxy="<%= https_proxy %>"
<% end %>

<% if_p('env.no_proxy') do |no_proxy| %>
export NO_PROXY="<%= no_proxy %>"
export no_proxy="<%= no_proxy %>"
<% end %>

<% if_p('vcenter.connection_options.ca_cert') do %>
  export BOSH_CA_CERT_FILE=$BOSH_JOBS_DIR/vsphere_cpi/config/cacert.pem
<% end %>
<% if_p('vcenter.nsx.ca_cert') do %>
  export BOSH_NSX_CA_CERT_FILE=$BOSH_JOBS_DIR/vsphere_cpi/config/nsx_cacert.pem
<% end %>


export PATH=$BOSH_PACKAGES_DIR/vsphere_cpi_ruby/bin:$BOSH_PACKAGES_DIR/vsphere_cpi_mkisofs/bin:$PATH

export BUNDLE_GEMFILE=$BOSH_PACKAGES_DIR/vsphere_cpi/Gemfile
bundle_cmd="${BOSH_PACKAGES_DIR}/vsphere_cpi_ruby/bin/bundle"

exec $bundle_cmd exec $BOSH_PACKAGES_DIR/vsphere_cpi/bin/vsphere_cpi \
  $BOSH_JOBS_DIR/vsphere_cpi/config/cpi.json<commit_msg>CPI has env var HOME set<commit_after>#!/bin/bash

set -e

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}

<% if_p('env.http_proxy') do |http_proxy| %>
export HTTP_PROXY="<%= http_proxy %>"
export http_proxy="<%= http_proxy %>"
<% end %>

<% if_p('env.https_proxy') do |https_proxy| %>
export HTTPS_PROXY="<%= https_proxy %>"
export https_proxy="<%= https_proxy %>"
<% end %>

<% if_p('env.no_proxy') do |no_proxy| %>
export NO_PROXY="<%= no_proxy %>"
export no_proxy="<%= no_proxy %>"
<% end %>

<% if_p('vcenter.connection_options.ca_cert') do %>
  export BOSH_CA_CERT_FILE=$BOSH_JOBS_DIR/vsphere_cpi/config/cacert.pem
<% end %>
<% if_p('vcenter.nsx.ca_cert') do %>
  export BOSH_NSX_CA_CERT_FILE=$BOSH_JOBS_DIR/vsphere_cpi/config/nsx_cacert.pem
<% end %>


export PATH=$BOSH_PACKAGES_DIR/vsphere_cpi_ruby/bin:$BOSH_PACKAGES_DIR/vsphere_cpi_mkisofs/bin:$PATH
export HOME=~

export BUNDLE_GEMFILE=$BOSH_PACKAGES_DIR/vsphere_cpi/Gemfile
bundle_cmd="${BOSH_PACKAGES_DIR}/vsphere_cpi_ruby/bin/bundle"

exec $bundle_cmd exec $BOSH_PACKAGES_DIR/vsphere_cpi/bin/vsphere_cpi \
  $BOSH_JOBS_DIR/vsphere_cpi/config/cpi.json
{'fraction_non_alphanumeric': 0.1670253981919931, 'fraction_numerical': 0.0, 'mean_word_length': 7.069444444444445, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '909677', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1039, 'n_words': 116}