<commit_before>#! /bin/bash
set -e 

baseDir="/homez.141/pharoorgde/files/vm"
case "${ARCH}" in
	macos32x86)
		destDir="$baseDir/pharo-spur32/mac" 
		;;
	macos64x64) 
		destDir="$baseDir/pharo-spur64/mac" 
		;;
	linux32x86) 
		destDir="$baseDir/pharo-spur32/linux" 
		;;
	linux64x64) 
		destDir="$baseDir/pharo-spur64/linux" 
		;;
	linux32ARMv6) 
		destDir="$baseDir/pharo-spur32/linux/armv6"
		;;
	win32x86) 
		destDir="$baseDir/pharo-spur32/win"
		;;
	win64x64) 
		destDir="$baseDir/pharo-spur64/win"
		;;
	*) 
		echo "Undefined platform!"
		exit 1
esac

readonly BUILD_DIR="${TRAVIS_BUILD_DIR:-${APPVEYOR_BUILD_FOLDER}}"
readonly PHARO_PRODUCTS_DIR="${BUILD_DIR}/productsPharo"

do_upload() {
	# function arguments
	local extension=$1
	for productName in "${PHARO_PRODUCTS_DIR}"/*.${extension}; do
		echo "Uploading $productName to files.pharo.org/$destDir"
		scp $productName files.pharo.org:$destDir/$productName
		if [[ "$HEARTBEAT" = "threaded" ]]; then 
			SUFFIX="-threaded"
		fi
		echo "Uploading $productName to files.pharo.org/$destDir/latest$SUFFIX.${extension}"
		scp $productName files.pharo.org:$destDir/latest$SUFFIX.${extension}
	done
}

do_upload "zip"
do_upload "dmg"<commit_msg>Fix scp invocation for files.pharo.org<commit_after>#! /bin/bash
set -e 

baseDir="/homez.141/pharoorgde/files/vm"
case "${ARCH}" in
	macos32x86)
		destDir="$baseDir/pharo-spur32/mac" 
		;;
	macos64x64) 
		destDir="$baseDir/pharo-spur64/mac" 
		;;
	linux32x86) 
		destDir="$baseDir/pharo-spur32/linux" 
		;;
	linux64x64) 
		destDir="$baseDir/pharo-spur64/linux" 
		;;
	linux32ARMv6) 
		destDir="$baseDir/pharo-spur32/linux/armv6"
		;;
	win32x86) 
		destDir="$baseDir/pharo-spur32/win"
		;;
	win64x64) 
		destDir="$baseDir/pharo-spur64/win"
		;;
	*) 
		echo "Undefined platform!"
		exit 1
esac

readonly BUILD_DIR="${TRAVIS_BUILD_DIR:-${APPVEYOR_BUILD_FOLDER}}"
readonly PHARO_PRODUCTS_DIR="${BUILD_DIR}/productsPharo"

do_upload() {
	# function arguments
	local extension=$1
	for productPath in "${PHARO_PRODUCTS_DIR}"/*.${extension}; do
		productName="$(basename "${productPath}")"
		echo "Uploading $productName to files.pharo.org/$destDir"
		scp $productPath files.pharo.org:$destDir/$productName
		if [[ "$HEARTBEAT" = "threaded" ]]; then 
			SUFFIX="-threaded"
		fi
		echo "Uploading $productName to files.pharo.org/$destDir/latest$SUFFIX.${extension}"
		scp $productPath files.pharo.org:$destDir/latest$SUFFIX.${extension}
	done
}

do_upload "zip"
do_upload "dmg"
{'fraction_non_alphanumeric': 0.1600486223662885, 'fraction_numerical': 0.03808752025931929, 'mean_word_length': 4.782201405152225, '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': '4611054', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1013, 'n_words': 143}