<commit_before>#!/bin/sh
#        Author: <NAME>
#   Description: Creates the ISO file
#     Copyright: 2010 PC-BSD Software / iXsystems
############################################################################

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

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

cd ${PROGDIR}/scripts

# Source our functions
. ${PROGDIR}/scripts/functions.sh

echo "Building DVD images.."

ISODISTDIR="${PDESTDIR9}/dist"

# Remove archive files
if [ -d "${ISODISTDIR}" ] ; then
  echo "Removing ${ISODISTDIR}"
  rm -rf ${ISODISTDIR}
fi
mkdir ${ISODISTDIR}

echo "Copying dist files.."
cp ${DISTDIR}/* ${ISODISTDIR}/
cp /usr/ports.txz ${ISODISTDIR}/ 2>/dev/null

rc_halt "mkdir -p ${ISODISTDIR}/packages"
rc_halt "mount_nullfs ${METAPKGDIR} ${ISODISTDIR}/packages"

# Set the file-date
fDate="-`date '+%m-%d-%Y'`"

# Base file name
bFile="PCBSD${ISOVER}${fDate}-${FARCH}"
export bFile

# Set the pcbsd-media-details file marker on this media
echo "PC-BSD ${PCBSDVER} "$ARCH" INSTALL DVD/USB - `date`" > ${PDESTDIR9}/pcbsd-media-details

# Use GRUB to create the hybrid DVD/USB image
echo "Creating ISO..."
grub-mkrescue -o ${PROGDIR}/iso/${bFile}-DVD-USB.iso ${PDESTDIR9} -- -volid "PCBSD_INSTALL"
if [ $? -ne 0 ] ; then
   exit_err "Failed running grub-mkrescue"
fi

# Run MD5 command
cd ${PROGDIR}/iso
md5 -q ${bFile}-DVD-USB.iso >${bFile}-DVD-USB.iso.md5
sha256 -q ${bFile}-DVD-USB.iso >${bFile}-DVD-USB.iso.sha256
ln -s ${bFile}-DVD-USB.iso latest.iso

rc_halt "umount ${ISODISTDIR}/packages"

exit 0<commit_msg>Create latest.iso.md5 and latest.iso.sha256 links when we spin up DVDs. This will be used by online updater in the future<commit_after>#!/bin/sh
#        Author: <NAME>
#   Description: Creates the ISO file
#     Copyright: 2010 PC-BSD Software / iXsystems
############################################################################

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

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

cd ${PROGDIR}/scripts

# Source our functions
. ${PROGDIR}/scripts/functions.sh

echo "Building DVD images.."

ISODISTDIR="${PDESTDIR9}/dist"

# Remove archive files
if [ -d "${ISODISTDIR}" ] ; then
  echo "Removing ${ISODISTDIR}"
  rm -rf ${ISODISTDIR}
fi
mkdir ${ISODISTDIR}

echo "Copying dist files.."
cp ${DISTDIR}/* ${ISODISTDIR}/
cp /usr/ports.txz ${ISODISTDIR}/ 2>/dev/null

rc_halt "mkdir -p ${ISODISTDIR}/packages"
rc_halt "mount_nullfs ${METAPKGDIR} ${ISODISTDIR}/packages"

# Set the file-date
fDate="-`date '+%m-%d-%Y'`"

# Base file name
bFile="PCBSD${ISOVER}${fDate}-${FARCH}"
export bFile

# Set the pcbsd-media-details file marker on this media
echo "PC-BSD ${PCBSDVER} "$ARCH" INSTALL DVD/USB - `date`" > ${PDESTDIR9}/pcbsd-media-details

# Use GRUB to create the hybrid DVD/USB image
echo "Creating ISO..."
grub-mkrescue -o ${PROGDIR}/iso/${bFile}-DVD-USB.iso ${PDESTDIR9} -- -volid "PCBSD_INSTALL"
if [ $? -ne 0 ] ; then
   exit_err "Failed running grub-mkrescue"
fi

# Run MD5 command
cd ${PROGDIR}/iso
md5 -q ${bFile}-DVD-USB.iso >${bFile}-DVD-USB.iso.md5
sha256 -q ${bFile}-DVD-USB.iso >${bFile}-DVD-USB.iso.sha256
ln -s ${bFile}-DVD-USB.iso latest.iso
ln -s ${bFile}-DVD-USB.iso.md5 latest.iso.md5
ln -s ${bFile}-DVD-USB.iso.sha256 latest.iso.sha256

rc_halt "umount ${ISODISTDIR}/packages"

exit 0
{'fraction_non_alphanumeric': 0.2050906963136337, 'fraction_numerical': 0.014628437682855471, 'mean_word_length': 4.333853354134165, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6850304', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1270, 'n_words': 326}