<commit_before>#!/bin/sh
# PC-BSD Build configuration settings

# Where is the build program installed
PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR

# Copy .dist files if necessary
if [ ! -e "${PROGDIR}/trueos.cfg" ] ; then
   cp ${PROGDIR}/trueos.cfg.dist ${PROGDIR}/trueos.cfg
fi
if [ ! -e "${PROGDIR}/repo.conf" ] ; then
   cp ${PROGDIR}/repo.conf.dist ${PROGDIR}/repo.conf
fi
if [ ! -d "${PROGDIR}/pkg" ] ; then
   cp -r ${PROGDIR}/pkg-dist ${PROGDIR}/pkg
fi
if [ ! -d "${PROGDIR}/pbi" ] ; then
   cp -r ${PROGDIR}/pbi-dist ${PROGDIR}/pbi
fi

cd ${PROGDIR}/scripts

# Source the config file
. ${PROGDIR}/trueos.cfg

# First, lets check if we have all the required programs to build an ISO
. ${PROGDIR}/scripts/functions.sh

# Check if we have required programs
sh ${PROGDIR}/scripts/checkprogs.sh
cStat=$?
if [ $cStat -ne 0 ] ; then exit $cStat; fi

do_world() {

  echo "Starting build of FreeBSD/TrueOS"
  ${PROGDIR}/scripts/1.createworld.sh
  if [ $? -ne 0 ] ; then
    echo "Script failed!"
    exit 1
  fi
}

do_iso() 
{
  if [ "$ARCH" = "i386" ] ; then return 0; fi

  echo "Building ISO file"

  rm ${PROGDIR}/iso/* >/dev/null 2>/dev/null

  # If on ARM, only need single image
  echo "$PACKAGE_ARCH" | grep -q "arm"
  if [ $? -eq 0 ] ; then
    unset SYSBUILD
  fi
  
   # If on AMD64, only need single image
  if [ -z "$PACKAGE_ARCH" -o "$PACKAGE_ARCH" = "amd64" ] ; then
    SYSBUILD="both"
  fi

  # Are we building both TrueOS / PC-BSD images?
  if [ -z "$SYSBUILD" -o "$SYSBUILD" = "BOTH" ] ; then
<commit_msg>Bah, case matters<commit_after>#!/bin/sh
# PC-BSD Build configuration settings

# Where is the build program installed
PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR

# Copy .dist files if necessary
if [ ! -e "${PROGDIR}/trueos.cfg" ] ; then
   cp ${PROGDIR}/trueos.cfg.dist ${PROGDIR}/trueos.cfg
fi
if [ ! -e "${PROGDIR}/repo.conf" ] ; then
   cp ${PROGDIR}/repo.conf.dist ${PROGDIR}/repo.conf
fi
if [ ! -d "${PROGDIR}/pkg" ] ; then
   cp -r ${PROGDIR}/pkg-dist ${PROGDIR}/pkg
fi
if [ ! -d "${PROGDIR}/pbi" ] ; then
   cp -r ${PROGDIR}/pbi-dist ${PROGDIR}/pbi
fi

cd ${PROGDIR}/scripts

# Source the config file
. ${PROGDIR}/trueos.cfg

# First, lets check if we have all the required programs to build an ISO
. ${PROGDIR}/scripts/functions.sh

# Check if we have required programs
sh ${PROGDIR}/scripts/checkprogs.sh
cStat=$?
if [ $cStat -ne 0 ] ; then exit $cStat; fi

do_world() {

  echo "Starting build of FreeBSD/TrueOS"
  ${PROGDIR}/scripts/1.createworld.sh
  if [ $? -ne 0 ] ; then
    echo "Script failed!"
    exit 1
  fi
}

do_iso() 
{
  if [ "$ARCH" = "i386" ] ; then return 0; fi

  echo "Building ISO file"

  rm ${PROGDIR}/iso/* >/dev/null 2>/dev/null

  # If on ARM, only need single image
  echo "$PACKAGE_ARCH" | grep -q "arm"
  if [ $? -eq 0 ] ; then
    unset SYSBUILD
  fi
  
   # If on AMD64, only need single image
  if [ -z "$PACKAGE_ARCH" -o "$PACKAGE_ARCH" = "amd64" ] ; then
    SYSBUILD="BOTH"
  fi

  # Are we building both TrueOS / PC-BSD images?
  if [ -z "$SYSBUILD" -o "$SYSBUILD" = "BOTH" ] ; then

{'fraction_non_alphanumeric': 0.1635362694300518, 'fraction_numerical': 0.009067357512953367, 'mean_word_length': 3.091390728476821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3716105', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1183, 'n_words': 354}