<commit_before>#!/bin/sh

if [ "${VERSION}" = "" ]; then
    VERSION="v0.4.1"
fi
BASE="ServeD-OS-Base"
LOG="/var/log/svd-install.log"

# sanity checks
test ! -d /Users && mkdir /Users

cd /
fetch http://dmilith.verknowsys.com/Public/9.3/${BASE}-${VERSION}.tar.xz
if [ "$?" != "0" ]; then
    echo "Binary snapshot isn't available, or something just went wrong while fetching archive"
    exit 1
fi

tar xf ${BASE}-${VERSION}.tar.xz

if [ "$?" != "0" ]; then
    echo "Binary snapshot corrupted or something just went wrong with archive"
    exit 1
fi

echo "Installation process started" > ${LOG}
. /etc/sofin.conf.sh
note "Sofin configuration loaded"

if [ "${SHELL}" != "/Software/Zsh/exports/zsh" ]; then
    note "Setting ZSH shell"
    printf "/Software/Zsh/exports/zsh\n" >> /etc/shells
    chsh -s /Software/Zsh/exports/zsh >> ${LOG} 2>&1
fi

if [ ! -d "/SystemUsers" ]; then
    note "Setting root home dir to /SystemUsers"
    mv /root /SystemUsers<commit_msg>Setup ZFS pools before installation. Turn on lz4 compression and fletcher4 checksums.<commit_after>#!/bin/sh

if [ "${VERSION}" = "" ]; then
    VERSION="v0.4.1"
fi
BASE="ServeD-OS-Base"
LOG="/var/log/svd-install.log"

# sanity checks
test ! -d /Users && mkdir /Users
for i in $(zpool list -H | awk '{print $1}'); do
    zfs set compression=lz4 $i
    zfs set checksum=fletcher4 $i
done

cd /
fetch http://dmilith.verknowsys.com/Public/9.3/${BASE}-${VERSION}.tar.xz
if [ "$?" != "0" ]; then
    echo "Binary snapshot isn't available, or something just went wrong while fetching archive"
    exit 1
fi

tar xf ${BASE}-${VERSION}.tar.xz

if [ "$?" != "0" ]; then
    echo "Binary snapshot corrupted or something just went wrong with archive"
    exit 1
fi

echo "Installation process started" > ${LOG}
. /etc/sofin.conf.sh
note "Sofin configuration loaded"

if [ "${SHELL}" != "/Software/Zsh/exports/zsh" ]; then
    note "Setting ZSH shell"
    printf "/Software/Zsh/exports/zsh\n" >> /etc/shells
    chsh -s /Software/Zsh/exports/zsh >> ${LOG} 2>&1
fi

if [ ! -d "/SystemUsers" ]; then
    note "Setting root home dir to /SystemUsers"
    mv /root /SystemUsers
{'fraction_non_alphanumeric': 0.1639267261625176, 'fraction_numerical': 0.012682010333489901, 'mean_word_length': 3.303030303030303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4357402', 'n_tokens_mistral': 779, 'n_tokens_neox': 748, 'n_words': 225}