<commit_before>#! /usr/bin/env /bin/bash
# Makes it easier to call salt

# will contain all sls
args=()
do_sync=false
do_init=false
do_all=true

# parse options
while [[ $# > 0 ]]; do
  current="$1"
  case $current in
      -s|--sync)
        do_sync=true
      ;;

      --init|"init.bootstrap")
        do_init=true
        do_all=false
      ;;

      *)
        args+=($current)
        do_all=false
      ;;
  esac
  shift
done

# activates the python environment
.  $(dirname $0)/../salt-env/bin/activate

if [[ "${do_sync}" = "true" ]] ; then
  salt-call --local saltutil.sync_all
fi

if [[ "${do_init}" = "true" ]]; then
  sudo salt-call --local state.sls init.bootstrap
fi
if [[ ${#args} -gt 0 ]]; then
  echo "NOT HERE - ${do_init} - ${args[@]}"
  for i in "${args[@]}"; do
    salt-call --local state.sls $i
  done
fi
if [[ "${do_all}" = "true" ]] ; then
  salt-call --local state.highstate<commit_msg>debug printout<commit_after>#! /usr/bin/env /bin/bash
# Makes it easier to call salt

# will contain all sls
args=()
do_sync=false
do_init=false
do_all=true

# parse options
while [[ $# > 0 ]]; do
  current="$1"
  case $current in
      -s|--sync)
        do_sync=true
      ;;

      --init|"init.bootstrap")
        do_init=true
        do_all=false
      ;;

      *)
        args+=($current)
        do_all=false
      ;;
  esac
  shift
done

# activates the python environment
.  $(dirname $0)/../salt-env/bin/activate

if [[ "${do_sync}" = "true" ]] ; then
  salt-call --local saltutil.sync_all
fi

if [[ "${do_init}" = "true" ]]; then
  sudo salt-call --local state.sls init.bootstrap
fi
if [[ ${#args} -gt 0 ]]; then
  for i in "${args[@]}"; do
    salt-call --local state.sls $i
  done
fi
if [[ "${do_all}" = "true" ]] ; then
  salt-call --local state.highstate
{'fraction_non_alphanumeric': 0.17554683118339875, 'fraction_numerical': 0.00448681996634885, 'mean_word_length': 2.4640776699029128, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2298591', 'n_tokens_mistral': 684, 'n_tokens_neox': 658, 'n_words': 171}