<commit_before>#!/bin/bash

set -x
set -e

SETUP_SRC=$(realpath ${BASH_SOURCE[0]})
SETUP_DIR=$(dirname $SETUP_SRC)
TOP_DIR=$(realpath $SETUP_DIR/..)

for ARG in RACKSPACE_USER RACKSPACE_API; do
	if [ -z "${!ARG}" ]; then
		echo "$ARG not set"
		exit 1
	else
		echo "$ARG='${!ARG}'"
	fi
done

BASE=$TOP_DIR/build/package-xilinx
echo $BASE
mkdir -p $BASE

(
	cd $BASE
	TB_COMMAND="turbolift -u $RACKSPACE_USER -a $RACKSPACE_API --os-rax-auth iad upload -c xilinx"

	# Upload the tar bz
	$TB_COMMAND -s . --sync --pattern-match ".*\.gpg"
	# Upload the index file
	md5sum *.gpg | sort -k2 > index.txt
	$TB_COMMAND -s . --sync --pattern-match "index.txt"
)<commit_msg>travis: Fix sorting of packages.<commit_after>#!/bin/bash

set -x
set -e

SETUP_SRC=$(realpath ${BASH_SOURCE[0]})
SETUP_DIR=$(dirname $SETUP_SRC)
TOP_DIR=$(realpath $SETUP_DIR/..)

for ARG in RACKSPACE_USER RACKSPACE_API; do
	if [ -z "${!ARG}" ]; then
		echo "$ARG not set"
		exit 1
	else
		echo "$ARG='${!ARG}'"
	fi
done

BASE=$TOP_DIR/build/package-xilinx
echo $BASE
mkdir -p $BASE

(
	cd $BASE
	TB_COMMAND="turbolift --verbose --colorized -u $RACKSPACE_USER -a $RACKSPACE_API --os-rax-auth iad upload -c xilinx"

	# Upload the tar bz
	$TB_COMMAND -s . --sync --pattern-match ".*\.gpg"
	# Upload the index file
	md5sum *.gpg | sort -t- -k4,5n > index.txt
	cat index.txt
	$TB_COMMAND -s . --sync --pattern-match "index.txt"
)
{'fraction_non_alphanumeric': 0.16702663786897048, 'fraction_numerical': 0.0064794816414686825, 'mean_word_length': 3.527687296416938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6026904', 'n_tokens_mistral': 613, 'n_tokens_neox': 597, 'n_words': 155}