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

set -ex

# This are defined elsewhere (usually in travis):
# 
# ARCH		- macos32x86, linux64x64, etc.
# SRC_ARCH	- i386, x64_86
# HEARTBEAT	- threaded, itimer (or none)

vmVersion="5.0"
productDir="../opensmalltalk-vm"
productArch=$SRC_ARCH
productHeartbeat=${HEARTBEAT}
case "${ARCH}" in
	macos32x86) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur" 
		pattern="*.app"
		os="mac"
		;;
	macos64x64) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur" 
		pattern="*.app"
		os="mac"
		;;
	linux32x86) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		;;
	linux64x64) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		;;
	linux32ARMv6) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		productArch="ARMv6"
		;;
	*) 
		echo "Undefined platform!"
		exit 1
esac

if [ -z "${productDir}" ]; then
	echo "Error: Product not found!"
	exit 1
fi

buildId="`echo ${TRAVIS_COMMIT} | cut -b 1-7`"
zipFileName="`pwd`/../pharo-${os}-${productArch}${productHeartbeat}.${buildId}.zip"
pushd .
cd ${productDir}
zip -r ${zipFileName} ${pattern}
popd<commit_msg>add windows platform to pack-vm<commit_after>#!/usr/bin/env bash

set -ex

# This are defined elsewhere (usually in travis):
# 
# ARCH		- macos32x86, linux64x64, etc.
# SRC_ARCH	- i386, x64_86
# HEARTBEAT	- threaded, itimer (or none)

vmVersion="5.0"
productDir="../opensmalltalk-vm"
productArch=$SRC_ARCH
productHeartbeat=${HEARTBEAT}
case "${ARCH}" in
	macos32x86) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur" 
		pattern="*.app"
		os="mac"
		;;
	macos64x64) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur" 
		pattern="*.app"
		os="mac"
		;;
	linux32x86) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		;;
	linux64x64) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		;;
	linux32ARMv6) 
		productDir="`find $productDir/products -name "${vmVersion}*"`" 
		pattern="*"
		os="linux"
		productArch="ARMv6"
		;;
	win32x86) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur/build/vm" 
		pattern="*.exe *.dll"
		os="win"
		;;
	win64x64) 
		productDir="$productDir/build.${ARCH}/pharo.cog.spur/build/vm" 
		pattern="*.exe *.dll"
		os="win"
		;;
	*) 
		echo "Undefined platform!"
		exit 1
esac

if [ -z "${productDir}" ]; then
	echo "Error: Product not found!"
	exit 1
fi


if [[ "${APPVEYOR}" ]]; then
	commitSHA="${APPVEYOR_REPO_COMMIT}"
else
	commitSHA="${TRAVIS_COMMIT}"
fi
buildId="`echo ${commitSHA} | cut -b 1-7`"
zipFileName="`pwd`/../pharo-${os}-${productArch}${productHeartbeat}.${buildId}.zip"
pushd .
cd ${productDir}
zip -r ${zipFileName} ${pattern}
popd
{'fraction_non_alphanumeric': 0.1948699679372996, 'fraction_numerical': 0.03206270039187745, 'mean_word_length': 4.4, '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': '7347300', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1118, 'n_words': 204}