<commit_before>#!/usr/bin/env bash
#
# VPNet.io - Virtual Private Network Essential Toolbox
#
# https://github.com/acrossfw/vpnet
#

source /acrossfw/vpnet-module.sh
vpnet::init_bash ${BASH_SOURCE[0]} # set all the magic

main() {
  local arg1=${1:-}
  
  echo
  echo "Starting VPNet Docker ..."
  echo
  
  vpnet::check_env
  
  vpnet::init_system
  vpnet::init_network
  # vpnet::init_service
  
  vpnet::run "${arg1}"
}<commit_msg>add test & lint<commit_after>#!/usr/bin/env bash
#
# VPNet.io - Virtual Private Network Essential Toolbox
#
# https://github.com/acrossfw/vpnet
#

source /acrossfw/vpnet-module.sh
vpnet::init_bash "${BASH_SOURCE[0]}" # set all the magic

main() {
  local arg1=${1:-}
  
  echo
  echo "Starting VPNet Docker ..."
  echo
  
  vpnet::check_env
  
  vpnet::init_system
  vpnet::init_network
  # vpnet::init_service
  
  case "$arg1" in
    start)
      # Use baseimage-docker's init system.
      # CMD ["/sbin/my_init"]
      echo -n "Getting my IP... "
      curl -sS ifconfig.io
      
      exec my_init
      
      err_code=$?
      echo "ERROR: my_init exit with error code $err_code"
      sleep 1
      exit $err_code
      ;;
    test)
      bats __root/test/*.bats
      if [ $? -eq 0 ]; then
        echo "Test PASS"
      else
        echo "ERROR: Test FAIL"
      fi
      exit -1
      ;;
    bash|sh|shell)
      echo "Creating shell..."
      exec /bin/bash -s
      exit $?
      ;;
    *)
      echo "ERROR: Unsupport arg $arg1"
      exit -1
      ;;
  esac

  echo "ERROR: Should not run to here!"
  exit -1
}
{'fraction_non_alphanumeric': 0.13141025641025642, 'fraction_numerical': 0.008974358974358974, 'mean_word_length': 2.1987704918032787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6227328', 'n_tokens_mistral': 610, 'n_tokens_neox': 570, 'n_words': 140}