<commit_before>#!/usr/bin/env bash

# Path to module-repo, ensymble, inside PythonForS60
PYS60DIR="${HOME}/build/pys60/PythonForS60"
CERPATH="${HOME}/Документы/Dropbox/Документы/doc/Python/PythonForS60/signing/cer"
PROJECTDIR=`pwd`
APPNAME=Medcalc
VERSION=0.6.4
CAPBLS=LocalServices+ReadUserData+WriteUserData+UserEnvironment
SRCDIR=src
TMPDIR=src.tmp
ICON=${SRCDIR}/logo2.svg

OPTS="--verbose
	  --appname=${APPNAME}
      --version=${VERSION}
      --caps=${CAPBLS}
      --vendor=EugeneDvoretsky
      --cert=${CERPATH}/2009-11-18.cer
      --privkey=${CERPATH}/2009-11-18.key
      --passphrase=''
      --lang=PO,RU
      --extrasdir=extras
      --icon=${PROJECTDIR}/${ICON}
      --textfile=${PROJECTDIR}/disclaimer.txt
      --heapsize=4k,5M
      "
#
# --extrasdir=     - Name of dir. tree placed under drive root
# --extra-modules= - Additional dependency modules that should be packaged with the application
# sys.prefix == 'C:\\resource\\python25'
# etc 'C:\\DATA\\python', 'System\libs', 'System\apps\python\my'

rm -r ${TMPDIR}/*
echo "Populating temp dir"

cp -r ${SRCDIR}/default.py ${TMPDIR}/
cp -r ${SRCDIR}/medcalc ${TMPDIR}/

mkdir -p ${TMPDIR}/extras/data/python/medcalc
cp -r ${SRCDIR}/img/* ${TMPDIR}/extras/data/python/medcalc/
# cp -r ${SRCDIR}/img/* ${TMPDIR}/extras/resource/python25/share/medcalc
<commit_msg>Correct tmp folder handling<commit_after>#!/usr/bin/env bash

# Path to module-repo, ensymble, inside PythonForS60
PYS60DIR="${HOME}/build/pys60/PythonForS60"
CERPATH="${HOME}/Документы/Dropbox/Документы/doc/Python/PythonForS60/signing/cer"
PROJECTDIR=`pwd`
APPNAME=Medcalc
VERSION=0.6.4
CAPBLS=LocalServices+ReadUserData+WriteUserData+UserEnvironment
SRCDIR=src
TMPDIR=src.tmp
ICON=${SRCDIR}/logo2.svg

OPTS="--verbose
      --appname=${APPNAME}
      --version=${VERSION}
      --caps=${CAPBLS}
      --vendor=EugeneDvoretsky
      --cert=${CERPATH}/2009-11-18.cer
      --privkey=${CERPATH}/2009-11-18.key
      --passphrase=''
      --lang=PO,RU
      --extrasdir=extras
      --icon=${PROJECTDIR}/${ICON}
      --textfile=${PROJECTDIR}/disclaimer.txt
      --heapsize=4k,5M
      "

# --extrasdir=     - Name of dir. tree placed under drive root
# --extra-modules= - Additional dependency modules that should be packaged with the application
# sys.prefix == 'C:\\resource\\python25'
# etc 'C:\\DATA\\python', 'System\libs', 'System\apps\python\my'

if [ -d "${TMPDIR}" ]
then
    echo "${TMPDIR} found"
    if find ${TMPDIR} -maxdepth 0 -empty | read v
    then
        echo "${TMPDIR} is empty, nothing to do"
    else
        echo "Removing ${TMPDIR} content"
        rm -r ${TMPDIR}/*
    fi
else
    echo "Creating an empty ${TMPDIR} directory"
    mkdir -p "${TMPDIR}/"
fi

cp -r ${SRCDIR}/default.py ${TMPDIR}/
cp -r ${SRCDIR}/medcalc ${TMPDIR}/

mkdir -p ${TMPDIR}/extras/data/python/medcalc
cp -r ${SRCDIR}/img/* ${TMPDIR}/extras/data/python/medcalc/
# cp -r ${SRCDIR}/img/* ${TMPDIR}/extras/resource/python25/share/medcalc

{'fraction_non_alphanumeric': 0.1765299260255548, 'fraction_numerical': 0.024546065904505716, 'mean_word_length': 3.4205052005943535, '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': '6834521', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1112, 'n_words': 203}