<commit_before>#!/bin/bash

SCALARIS_VERSION="0.7.2+svn"
date=`date +"%Y%m%d"`
name="scalaris-examples-wiki" # folder base name (without version)
url="http://scalaris.googlecode.com/svn/trunk/contrib/wikipedia"
package_url="http://scalaris.googlecode.com/svn/trunk/contrib/packages/examples-wiki"
deletefolder=0 # set to 1 to delete the folder the repository is checked out to

#####

folder="./${name}"

if [ ! -d ${folder} ]; then
  echo "checkout ${url} -> ${folder} ..."
  svn checkout ${url} ${folder}
  result=$?
else
  echo "update ${url} -> ${folder} ..."
  svn update ${folder}
  result=$?
fi

if ! diff -q checkout.sh ${folder}/contrib/packages/examples-wiki/checkout.sh > /dev/null ; then
  echo "checkout-script changed - re-run ./checkout.sh"
  cp ${folder}/contrib/packages/examples-wiki/checkout.sh ./ ; exit 1
fi

package_folder="./packaging"

if [ ! -d ${package_folder} ]; then
  echo "checkout ${package_url} -> ${package_folder} ..."
  svn checkout ${package_url} ${package_folder}
  result=$?
else
  echo "update ${package_url} -> ${package_folder} ..."
  svn update ${package_folder}
  result=$?
fi

if [ ${result} -eq 0 ]; then
  echo -n "get svn revision ..."
  revision=`svn info ${folder} --xml | grep revision | cut -d '"' -f 2 | head -n 1`
  result=$?
  echo " ${revision}"
  # not safe in other languages than English:
  # revision=`svn info ${name} | grep "Revision:" | cut -d ' ' -f 4`
  pkg_version="${SCALARIS_VERSION}${revision}"
fi

if [ ${result} -eq 0 ]; then
  tarfile="${folder}-${pkg_version}.tar.gz"
  newfoldername="${folder}-${pkg_version}"
  echo "making ${tarfile} ..."
  mv "${folder}" "${newfoldername}" && tar -czf ${tarfile} ${newfoldername} --exclude-vcs && mv "${newfoldername}" "${folder}"<commit_msg>packages: fix the auto-update script of examples-wiki from r7189<commit_after>#!/bin/bash

SCALARIS_VERSION="0.7.2+svn"
date=`date +"%Y%m%d"`
name="scalaris-examples-wiki" # folder base name (without version)
url="http://scalaris.googlecode.com/svn/trunk/contrib/wikipedia"
package_url="http://scalaris.googlecode.com/svn/trunk/contrib/packages/examples-wiki"
deletefolder=0 # set to 1 to delete the folder the repository is checked out to

#####

folder="./${name}"

if [ ! -d ${folder} ]; then
  echo "checkout ${url} -> ${folder} ..."
  svn checkout ${url} ${folder}
  result=$?
else
  echo "update ${url} -> ${folder} ..."
  svn update ${folder}
  result=$?
fi

package_folder="./packaging"

if [ ! -d ${package_folder} ]; then
  echo "checkout ${package_url} -> ${package_folder} ..."
  svn checkout ${package_url} ${package_folder}
  result=$?
else
  echo "update ${package_url} -> ${package_folder} ..."
  svn update ${package_folder}
  result=$?
fi

if ! diff -q checkout.sh ${package_folder}/checkout.sh > /dev/null ; then
  echo "checkout-script changed - re-run ./checkout.sh"
  cp ${package_folder}/checkout.sh ./ ; exit 1
fi

if [ ${result} -eq 0 ]; then
  echo -n "get svn revision ..."
  revision=`svn info ${folder} --xml | grep revision | cut -d '"' -f 2 | head -n 1`
  result=$?
  echo " ${revision}"
  # not safe in other languages than English:
  # revision=`svn info ${name} | grep "Revision:" | cut -d ' ' -f 4`
  pkg_version="${SCALARIS_VERSION}${revision}"
fi

if [ ${result} -eq 0 ]; then
  tarfile="${folder}-${pkg_version}.tar.gz"
  newfoldername="${folder}-${pkg_version}"
  echo "making ${tarfile} ..."
  mv "${folder}" "${newfoldername}" && tar -czf ${tarfile} ${newfoldername} --exclude-vcs && mv "${newfoldername}" "${folder}"
{'fraction_non_alphanumeric': 0.1956707490743378, 'fraction_numerical': 0.00740529763600114, 'mean_word_length': 3.995732574679943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '357782', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1211, 'n_words': 319}