<commit_before>#!/bin/bash
# export PS4='+${BASH_SOURCE}:${LINENO}:${FUNCNAME[0]}: '
set -x
set -e
GEM_GIT_PACKAGE="oq-hazardlib"
GEM_DEB_PACKAGE="python-${GEM_GIT_PACKAGE}"
GEM_DEB_SERIE="master"
if [ -z "$GEM_DEB_REPO" ]; then
    GEM_DEB_REPO="$HOME/gem_ubuntu_repo"
fi
GEM_BUILD_ROOT="build-deb"
GEM_BUILD_SRC="${GEM_BUILD_ROOT}/${GEM_DEB_PACKAGE}"

GEM_ALWAYS_YES=false

GEM_EPHEM_NAME="ubuntu-lxc-eph"

NL="
"
TB="	"

#
#  functions
sig_hand () {
    echo "signal trapped"
    if [ "$lxc_name" != "" ]; then
        echo "Destroying [$lxc_name] lxc"
        sudo lxc-stop -n $lxc_name || true
        sudo umount /var/lib/lxc/$lxc_name/rootfs || true
        sudo umount /var/lib/lxc/$lxc_name/ephemeralbind || true
        sudo lxc-destroy -n $lxc_name || true
    fi
}

mksafedir () {
    local dname

    dname="$1"
    if [ "$GEM_ALWAYS_YES" != "true" -a -d "$dname" ]; then
        echo "$dname already exists"
        echo "press Enter to continue or CTRL+C to abort"
        read a
    fi
    rm -rf $dname
    mkdir -p $dname
}
<commit_msg>manage cleanup of lxc (removed set -e)<commit_after>#!/bin/bash
# export PS4='+${BASH_SOURCE}:${LINENO}:${FUNCNAME[0]}: '
set -x
set -e
GEM_GIT_PACKAGE="oq-hazardlib"
GEM_DEB_PACKAGE="python-${GEM_GIT_PACKAGE}"
GEM_DEB_SERIE="master"
if [ -z "$GEM_DEB_REPO" ]; then
    GEM_DEB_REPO="$HOME/gem_ubuntu_repo"
fi
GEM_BUILD_ROOT="build-deb"
GEM_BUILD_SRC="${GEM_BUILD_ROOT}/${GEM_DEB_PACKAGE}"

GEM_ALWAYS_YES=false

GEM_EPHEM_NAME="ubuntu-lxc-eph"

NL="
"
TB="	"

#
#  functions
sig_hand () {
    echo "signal trapped"
    if [ "$lxc_name" != "" ]; then
        set +e
        echo "Destroying [$lxc_name] lxc"
        sudo lxc-stop -n $lxc_name
        sudo umount /var/lib/lxc/$lxc_name/rootfs
        sudo umount /var/lib/lxc/$lxc_name/ephemeralbind
        sudo lxc-destroy -n $lxc_name
    fi
}

mksafedir () {
    local dname

    dname="$1"
    if [ "$GEM_ALWAYS_YES" != "true" -a -d "$dname" ]; then
        echo "$dname already exists"
        echo "press Enter to continue or CTRL+C to abort"
        read a
    fi
    rm -rf $dname
    mkdir -p $dname
}

{'fraction_non_alphanumeric': 0.15122873345935728, 'fraction_numerical': 0.002835538752362949, 'mean_word_length': 3.1186770428015564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2517443', 'n_tokens_mistral': 941, 'n_tokens_neox': 899, 'n_words': 176}