<commit_before>#!/bin/sh

# Most of these dont need to be modified
#########################################################

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

# Source vars
. ${PROGDIR}/pcbsd.cfg

# Where on disk is the PCBSD GIT branch
PCBSDSRC="${PROGDIR}/git/pcbsd"
export PCBSDSRC

# Where are the dist files
DISTDIR="${PROGDIR}/fbsd-dist" ; export DISTDIR

# Set the dist files
BASEDIST="$DISTDIR/base.txz"
KERNDIST="$DISTDIR/kernel.txz"
L32DIST="$DISTDIR/lib32.txz"
export BASEDIST KERNDIST L32DIST

# Kernel Config
PCBSDKERN="GENERIC" ; export PCBSDKERN

# Location of FreeBSD sources
WORLDSRC="${PROGDIR}/git/freebsd"
export WORLDSRC

# Where to build the world directory
PDESTDIR="${PROGDIR}/buildworld" ; export PDESTDIR
PDESTDIR9="${PROGDIR}/buildworld9" ; export PDESTDIR9
PDESTDIRFBSD="${PROGDIR}/buildworld-fbsd" ; export PDESTDIRFBSD
PDESTDIRSERVER="${PROGDIR}/buildworld-server" ; export PDESTDIRSERVER

# Set the PC-BSD Version
export PCBSDVER="${TARGETREL}"

# Set the ISO Version
REVISION="`cat ${WORLDSRC}/sys/conf/newvers.sh 2>/dev/null | grep '^REVISION=' | cut -d '"' -f 2`"
if [ -z "$REVISION" ] ; then
   REVISION="UNKNOWN"
fi
BRANCH="`cat ${WORLDSRC}/sys/conf/newvers.sh 2>/dev/null | grep '^BRANCH=' | cut -d '"' -f 2`"
if [ -z "$BRANCH" ] ; then
   BRANCH="UNKNOWN"
fi
if [ -z "$ISOVER" ] ; then
  # This can be overridden via pcbsd.cfg
  export ISOVER="${REVISION}-${BRANCH}"
fi

# Where are the config files
PCONFDIR="${PCBSDSRC}/build-files/conf" ; export PCONFDIR
if [ "$SYSBUILD" = "trueos" ] ; then
  PCONFDIR="${PCBSDSRC}/build-files/conf/trueos" ; export PCONFDIR
fi

# Where do we place the log files
PLOGFILES="${PROGDIR}/log" ; export PLOGFILES

REALARCH="`uname -m`"
export REALARCH
case $ARCH in
   i386) FARCH="x86" ; export FARCH ;;
  amd64) FARCH="x64" ; export FARCH ;;
      *) FARCH="x86" ; export FARCH ;;
esac

# Set the location of packages needed for our Meta-Packages
export METAPKGDIR="${PROGDIR}/tmp"

if [ -z "$JAILVER" ] ; then
  JAILVER="$TARGETREL"
fi
if [ -z "$PKGVERUPLOAD" ] ; then
  PKGVERUPLOAD="$JAILVER"
fi

# Synth variables
if [ "$SYSBUILD" = "trueos" -a -z "$DOINGSYSBOTH" ] ; then
  PBUILD="trueos-`echo $JAILVER | sed 's|\.||g'`"
  if [ "$ARCH" = "i386" ] ; then PBUILD="${PBUILD}-i386"; fi
else
  PBUILD="pcbsd-`echo $JAILVER | sed 's|\.||g'`"
  if [ "$ARCH" = "i386" ] ; then PBUILD="${PBUILD}-i386"; fi
fi
PPKGDIR="/synth/pkg/$PBUILD-$GITPCBSDBRANCH"
PJPORTSDIR="/synth/ports"
export PBUILD JPORTSDIR PPKGDIR
if [ ! -e "$PPKGDIR" ] ; then
  mkdir -p ${PPKGDIR}
fi

# Check for required dirs
rDirs="/log /git /iso /fbsd-dist /tmp"
for i in $rDirs
do
  if [ ! -d "${PROGDIR}/${i}" ] ; then
     mkdir -p ${PROGDIR}/${i}
  fi
done

################
# Functions
################<commit_msg>Move pkg dir for PC-BSD / synth<commit_after>#!/bin/sh

# Most of these dont need to be modified
#########################################################

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

# Source vars
. ${PROGDIR}/pcbsd.cfg

# Where on disk is the PCBSD GIT branch
PCBSDSRC="${PROGDIR}/git/pcbsd"
export PCBSDSRC

# Where are the dist files
DISTDIR="${PROGDIR}/fbsd-dist" ; export DISTDIR

# Set the dist files
BASEDIST="$DISTDIR/base.txz"
KERNDIST="$DISTDIR/kernel.txz"
L32DIST="$DISTDIR/lib32.txz"
export BASEDIST KERNDIST L32DIST

# Kernel Config
PCBSDKERN="GENERIC" ; export PCBSDKERN

# Location of FreeBSD sources
WORLDSRC="${PROGDIR}/git/freebsd"
export WORLDSRC

# Where to build the world directory
PDESTDIR="${PROGDIR}/buildworld" ; export PDESTDIR
PDESTDIR9="${PROGDIR}/buildworld9" ; export PDESTDIR9
PDESTDIRFBSD="${PROGDIR}/buildworld-fbsd" ; export PDESTDIRFBSD
PDESTDIRSERVER="${PROGDIR}/buildworld-server" ; export PDESTDIRSERVER

# Set the PC-BSD Version
export PCBSDVER="${TARGETREL}"

# Set the ISO Version
REVISION="`cat ${WORLDSRC}/sys/conf/newvers.sh 2>/dev/null | grep '^REVISION=' | cut -d '"' -f 2`"
if [ -z "$REVISION" ] ; then
   REVISION="UNKNOWN"
fi
BRANCH="`cat ${WORLDSRC}/sys/conf/newvers.sh 2>/dev/null | grep '^BRANCH=' | cut -d '"' -f 2`"
if [ -z "$BRANCH" ] ; then
   BRANCH="UNKNOWN"
fi
if [ -z "$ISOVER" ] ; then
  # This can be overridden via pcbsd.cfg
  export ISOVER="${REVISION}-${BRANCH}"
fi

# Where are the config files
PCONFDIR="${PCBSDSRC}/build-files/conf" ; export PCONFDIR
if [ "$SYSBUILD" = "trueos" ] ; then
  PCONFDIR="${PCBSDSRC}/build-files/conf/trueos" ; export PCONFDIR
fi

# Where do we place the log files
PLOGFILES="${PROGDIR}/log" ; export PLOGFILES

REALARCH="`uname -m`"
export REALARCH
case $ARCH in
   i386) FARCH="x86" ; export FARCH ;;
  amd64) FARCH="x64" ; export FARCH ;;
      *) FARCH="x86" ; export FARCH ;;
esac

# Set the location of packages needed for our Meta-Packages
export METAPKGDIR="${PROGDIR}/tmp"

if [ -z "$JAILVER" ] ; then
  JAILVER="$TARGETREL"
fi
if [ -z "$PKGVERUPLOAD" ] ; then
  PKGVERUPLOAD="$JAILVER"
fi

# Synth variables
if [ "$SYSBUILD" = "trueos" -a -z "$DOINGSYSBOTH" ] ; then
  PBUILD="trueos-`echo $JAILVER | sed 's|\.||g'`"
  if [ "$ARCH" = "i386" ] ; then PBUILD="${PBUILD}-i386"; fi
else
  PBUILD="pcbsd-`echo $JAILVER | sed 's|\.||g'`"
  if [ "$ARCH" = "i386" ] ; then PBUILD="${PBUILD}-i386"; fi
fi
PPKGDIR="/synth/pkg/$PBUILD"
PJPORTSDIR="/synth/ports"
export PBUILD JPORTSDIR PPKGDIR
if [ ! -e "$PPKGDIR" ] ; then
  mkdir -p ${PPKGDIR}
fi

# Check for required dirs
rDirs="/log /git /iso /fbsd-dist /tmp"
for i in $rDirs
do
  if [ ! -d "${PROGDIR}/${i}" ] ; then
     mkdir -p ${PROGDIR}/${i}
  fi
done

################
# Functions
################
{'fraction_non_alphanumeric': 0.19237557359689375, 'fraction_numerical': 0.012707377338510413, 'mean_word_length': 4.491279069767442, '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': '3189962', 'n_tokens_mistral': 2316, 'n_tokens_neox': 2188, 'n_words': 551}