<commit_before>#!/bin/bash

#
# Determine the actual package name and version for xserver-xorg-core
#
PACKAGE=`dpkg-query -W | awk '/xserver-xorg-core/ { print $1 }'`
VERSION=`dpkg-query -W | awk '/xserver-xorg-core/ { print $2 }' | cut -d: -f 2 | cut -d'-' -f 1`
SUFFIX=`echo ${PACKAGE} | sed 's/xserver-xorg-core//'`

echo "package=${PACKAGE}"
echo "version=${VERSION}"
echo "suffix=${SUFFIX}"

mkdir -p external/Source
cd external/Source

USE_APT_GET=1

if [ ${USE_APT_GET} == 1 ]; then
sudo apt-get build-dep xorg-server${SUFFIX} ${PACKAGE}
apt-get source xorg-server${SUFFIX}
ln -s xorg-server${SUFFIX}-${VERSION} xorg-server
else
XORG_NAME=xorg-server-${VERSION}

wget http://xorg.freedesktop.org/releases/individual/xserver/${XORG_NAME}.tar.gz
tar zxvf ${XORG_NAME}.tar.gz
ln -s ${XORG_NAME} xorg-server
rm ${XORG_NAME}.tar.gz
fi<commit_msg>Added comments and did some cleanup<commit_after>#!/bin/bash

#
# Grab the actual package name and version for xserver-xorg-core.  Note
# that this name can differ on various Linux distros (e.g., the package
# is xserver-xorg-core-lts-raring on Ubuntu 12.04 LTS).
#
PACKAGE=`dpkg-query -W | awk '/xserver-xorg-core/ { print $1 }'`
VERSION=`dpkg-query -W | awk '/xserver-xorg-core/ { print $2 }' | cut -d: -f 2 | cut -d'-' -f 1`
SUFFIX=`echo ${PACKAGE} | sed 's/xserver-xorg-core//'`

echo "package=${PACKAGE}"
echo "version=${VERSION}"
echo "suffix=${SUFFIX}"

mkdir -p external/Source
cd external/Source

#
# This controls whether we use apt-get or grab sources directly
# from xorg.freedesktop.org.
#
USE_APT_GET=1

if [ ${USE_APT_GET} == 1 ]; then

#
# Use apt-get to grab sources
#
#sudo apt-get build-dep xorg-server${SUFFIX} ${PACKAGE}
sudo apt-get build-dep xorg-server${SUFFIX}
apt-get source xorg-server${SUFFIX}
ln -s xorg-server${SUFFIX}-${VERSION} xorg-server

else

#
# Grab sources directly from xorg.freedesktop.org
#
XORG_NAME=xorg-server-${VERSION}

wget http://xorg.freedesktop.org/releases/individual/xserver/${XORG_NAME}.tar.gz
tar zxvf ${XORG_NAME}.tar.gz
ln -s ${XORG_NAME} xorg-server
rm ${XORG_NAME}.tar.gz

fi
{'fraction_non_alphanumeric': 0.16714697406340057, 'fraction_numerical': 0.007684918347742555, 'mean_word_length': 4.327365728900256, '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': '6746298', 'n_tokens_mistral': 865, 'n_tokens_neox': 822, 'n_words': 201}