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

mkdir -p ${OWNCLOUD_INSTALL_DIR}

if [[ ! -f ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2 ]]; then
  echo "Downloading ownCloud ${OWNCLOUD_VERSION}..."
  wget "https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2" -O ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2
fi

echo "Extracting ownCloud ${OWNCLOUD_VERSION}..."
tar -xf ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2 --strip=1 -C ${OWNCLOUD_INSTALL_DIR}
rm -rf ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2

# upload_max_filesize
(
  echo "default_charset='UTF-8'"
  echo "output_buffering=off"
) > ${OWNCLOUD_INSTALL_DIR}/.user.ini

# set directory permissions<commit_msg>Revert "configuring `always_populate_raw_post_data = -1` is no longer required"<commit_after>#!/bin/bash
set -e

mkdir -p ${OWNCLOUD_INSTALL_DIR}

if [[ ! -f ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2 ]]; then
  echo "Downloading ownCloud ${OWNCLOUD_VERSION}..."
  wget "https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2" -O ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2
fi

echo "Extracting ownCloud ${OWNCLOUD_VERSION}..."
tar -xf ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2 --strip=1 -C ${OWNCLOUD_INSTALL_DIR}
rm -rf ${OWNCLOUD_BUILD_DIR}/owncloud-${OWNCLOUD_VERSION}.tar.bz2

# required by owncloud
sed -i "s|[;]*[ ]*always_populate_raw_post_data = .*|always_populate_raw_post_data = -1|" /etc/php5/fpm/php.ini
sed -i "s|[;]*[ ]*always_populate_raw_post_data = .*|always_populate_raw_post_data = -1|" /etc/php5/cli/php.ini

# upload_max_filesize
(
  echo "default_charset='UTF-8'"
  echo "output_buffering=off"
) > ${OWNCLOUD_INSTALL_DIR}/.user.ini

# set directory permissions
{'fraction_non_alphanumeric': 0.16350446428571427, 'fraction_numerical': 0.010602678571428572, 'mean_word_length': 5.817490494296578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3674668', 'n_tokens_mistral': 752, 'n_tokens_neox': 725, 'n_words': 105}