<commit_before>#!/bin/bash
#
# Script for uploading Travis release builds to www.knopflerfish.org
#
# Takes 1 argument <Release version>
#
# Note! No whitespace in filenames!
#
PRIVATE_KEY=tools/travis/id_rsa.travis
RELEASE_DIR=out/distrib_$1
KF_SERVER=isora.oderland.com
KF_USER=makewav1
KF_RELEASES_DIR=public_html-knopflerfish.org/releases/
SSH_OPT="StrictHostKeyChecking no"

if [ ! -d "$RELEASE_DIR" ] ; then
    echo "Release not found at: $RELEASE_DIR"
    exit 1
fi

echo "Uploading KF release $1 to www.knopflerfish.org"
scp -rpqB -o "$SSH_OPT" -i $PRIVATE_KEY $RELEASE_DIR $KF_USER@$KF_SERVER:$KF_RELEASES_DIR/$1

if [[ "$1" =~ [0-9]+\.[0-9]+\.[0-9]+ ]] ; then
    echo "Official release build, update release soft-link"
    MAJOR=`echo $1 | cut -d. -f1`
    LINK="current-kf_$MAJOR"
    ssh -n -o "$SSH_OPT" -i $PRIVATE_KEY -l $KF_USER $KF_SERVER "cd $KF_RELEASES_DIR && rm $LINK && ln -s $1 $LINK"
fi<commit_msg>Use ssh tunneled tar instead of scp<commit_after>#!/bin/bash
#
# Script for uploading Travis release builds to www.knopflerfish.org
#
# Takes 1 argument <Release version>
#
# Note! No whitespace in filenames!
#
PRIVATE_KEY=tools/travis/id_rsa.travis
RELEASE_DIR=out/distrib_$1
KF_SERVER=isora.oderland.com
KF_USER=makewav1
KF_RELEASES_DIR=public_html-knopflerfish.org/releases
SSH_OPT="StrictHostKeyChecking no"

if [ ! -d "$RELEASE_DIR" ] ; then
    echo "Release not found at: $RELEASE_DIR"
    exit 1
fi

echo "Uploading KF release $1 to www.knopflerfish.org"
tar czpf - -C $RELEASE_DIR . | ssh -o "$SSH_OPT" -i $PRIVATE_KEY  -l $KF_USER $KF_SERVER "mkdir $KF_RELEASES_DIR/$1 && tar xzpf - -C $KF_RELEASES_DIR/$1"

if [[ "$1" =~ [0-9]+\.[0-9]+\.[0-9]+ ]] ; then
    echo "Official release build, update release soft-link"
    MAJOR=`echo $1 | cut -d. -f1`
    LINK="current-kf_$MAJOR"
    ssh -n -o "$SSH_OPT" -i $PRIVATE_KEY -l $KF_USER $KF_SERVER "cd $KF_RELEASES_DIR && rm $LINK && ln -s $1 $LINK"
fi
{'fraction_non_alphanumeric': 0.14507772020725387, 'fraction_numerical': 0.01709844559585492, 'mean_word_length': 4.218918918918919, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7288586', 'n_tokens_mistral': 855, 'n_tokens_neox': 827, 'n_words': 193}