<commit_before>#!/bin/bash

pushd ../
_SOURCE_DIR="./"
_BINARY_LOG_LEVEL="INFO"

function pkg_init {
_INCLUDE_PATH=""

pyinstaller --onefile \
  --noconfirm \
  --log-level $_BINARY_LOG_LEVEL \
  --additional-hooks-dir=$_SOURCE_DIR \
  $_INCLUDE_PATH \
  hubble.py
}

function pkg_clean {
  rm -rf *spec *pyc build dist
}

function pkg_create {
cp -rf conf/hubble /etc/hubble/
cp -rf conf/hubble-profile.sh /etc/profile.d/
mv dist/hubble /opt/hubble/
cp -rf conf/hubble /etc/hubble/
tar -cPvzf hubble.tar.gz /etc/hubble /etc/osquery /opt/hubble /opt/osquery /var/log/osquery /etc/profile.d/hubble-profile.sh
}

$1
popd<commit_msg>Update the pyinstaller to create a onedir binary to comply with CIS<commit_after>#!/bin/bash

pushd ../
_SOURCE_DIR="./"
_BINARY_LOG_LEVEL="INFO"

function pkg_init {
_INCLUDE_PATH=""

pyinstaller --onedir \
  --noconfirm \
  --log-level $_BINARY_LOG_LEVEL \
  --additional-hooks-dir=$_SOURCE_DIR \
  $_INCLUDE_PATH \
  hubble.py
}

function pkg_clean {
  rm -rf *spec *pyc build dist
}

function pkg_create {
cp -rf conf/hubble /etc/hubble/
cp -rf conf/hubble-profile.sh /etc/profile.d/
mv dist/hubble /opt/hubble/
cp -rf conf/hubble /etc/hubble/
tar -cPvzf hubble.tar.gz /etc/hubble /etc/osquery /opt/hubble /opt/osquery /var/log/osquery /etc/profile.d/hubble-profile.sh
}

$1
popd
{'fraction_non_alphanumeric': 0.1431835491241432, 'fraction_numerical': 0.0015232292460015233, 'mean_word_length': 3.2941176470588234, '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': '6861701', 'n_tokens_mistral': 559, 'n_tokens_neox': 536, 'n_words': 112}