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

UPSTREAM_GIT="git://github.com/kr/pty"
SOURCE_NAME="golang-pty"

WORK_DIR=$(mktemp -d)
pushd ${WORK_DIR}

git clone ${UPSTREAM_GIT} ${SOURCE_NAME}
pushd ${SOURCE_NAME}

UPSTREAM_CONFIG=$(git log -n 1 --date="short" --pretty="%ad %h" | sed 's/\-//g')
UPSTREAM_DATE=$(echo ${UPSTREAM_CONFIG} | awk '{print $1}')
UPSTREAM_HASH=$(echo ${UPSTREAM_CONFIG} | awk '{print $2}')
ARCHIVE_NAME="golang-pty_${UPSTREAM_DATE}.1.${UPSTREAM_HASH}.orig.tar.xz"

git archive \
    --prefix golang-pty_${UPSTREAM_HASH} \
    -o ../${ARCHIVE_NAME} \
    ${UPSTREAM_HASH}

popd

echo $(pwd)

popd

if [ ! -d ../tarballs/ ]; then
    mkdir -p ../tarballs/
fi

mv ${WORK_DIR}/${ARCHIVE_NAME} ../tarballs/

echo ""
echo "   ../tarballs/${ARCHIVE_NAME}"
echo ""
echo "   dch --newversion ${UPSTREAM_DATE}.1.${UPSTREAM_HASH}-1 'New upstream release.'"
echo ""

rm -rf ${WORK_DIR}<commit_msg>add better things.<commit_after>#!/bin/bash
set -e

UPSTREAM_GIT="git://github.com/kr/pty"
SOURCE_NAME="golang-pty"

WORK_DIR=$(mktemp -d)
pushd ${WORK_DIR}

git clone ${UPSTREAM_GIT} ${SOURCE_NAME}
pushd ${SOURCE_NAME}

UPSTREAM_CONFIG=$(git log -n 1 --date="short" --pretty="%ad %h" | sed 's/\-//g')
UPSTREAM_DATE=$(echo ${UPSTREAM_CONFIG} | awk '{print $1}')
UPSTREAM_HASH=$(echo ${UPSTREAM_CONFIG} | awk '{print $2}')
ARCHIVE_NAME="golang-pty_0.0~git${UPSTREAM_DATE}.1.${UPSTREAM_HASH}.orig.tar.xz"

git archive \
    --prefix golang-pty_${UPSTREAM_HASH} \
    -o ../${ARCHIVE_NAME} \
    ${UPSTREAM_HASH}

popd

echo $(pwd)

popd

if [ ! -d ../tarballs/ ]; then
    mkdir -p ../tarballs/
fi

mv ${WORK_DIR}/${ARCHIVE_NAME} ../tarballs/

echo ""
echo "   ../tarballs/${ARCHIVE_NAME}"
echo ""
echo "   dch --newversion 0.0~git${UPSTREAM_DATE}.1.${UPSTREAM_HASH}-1 'New upstream release.'"
echo ""

rm -rf ${WORK_DIR}
{'fraction_non_alphanumeric': 0.20725673446948872, 'fraction_numerical': 0.008796041781198461, 'mean_word_length': 4.0, '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': '3084574', 'n_tokens_mistral': 770, 'n_tokens_neox': 737, 'n_words': 145}