<commit_before>#!/bin/bash

usage(){
cat << EOF
usage: $0 -t=TYPE -b=BRANCH -a=ARCH
EOF
exit 1
}

TYPE=
BRANCH=
ARCH=

while getopts "a:b:t:" OPT; do
    case $OPT in
        "a")
            ARCH=$OPTARG
            ;;
        "b")
            BRANCH=$OPTARG
            ;;
        "t")
            TYPE=$OPTARG
            ;;
        ?)
            usage
            ;;
    esac
done


if [[ -z $TYPE ]] || [[ -z $BRANCH ]] || [[ -z $ARCH ]]; then
    usage
fi


case $BRANCH in
    "stable")
        ;;
    "test")
        $BRANCH="testing"
        ;;
    *)
        $BRANCH="unstable"
esac

cd /srv/packages/smprc/dists/$TYPE/$BRANCH/main/binary-amd64 && dpkg-scanpackages . &>/dev/null | gzip -c9 > Packages.gz<commit_msg>correct variable rebinding<commit_after>#!/bin/bash

usage(){
cat << EOF
usage: $0 -t=TYPE -b=BRANCH -a=ARCH
EOF
exit 1
}

TYPE=
BRANCH=
ARCH=

while getopts "a:b:t:" OPT; do
    case $OPT in
        "a")
            ARCH=$OPTARG
            ;;
        "b")
            BRANCH=$OPTARG
            ;;
        "t")
            TYPE=$OPTARG
            ;;
        ?)
            usage
            ;;
    esac
done


if [[ -z $TYPE ]] || [[ -z $BRANCH ]] || [[ -z $ARCH ]]; then
    usage
fi


case $BRANCH in
    "stable")
        ;;
    "test")
        BRANCH="testing"
        ;;
    *)
        BRANCH="unstable"
esac

cd /srv/packages/smprc/dists/$TYPE/$BRANCH/main/binary-amd64 && dpkg-scanpackages . &>/dev/null | gzip -c9 > Packages.gz
{'fraction_non_alphanumeric': 0.16655290102389078, 'fraction_numerical': 0.006825938566552901, 'mean_word_length': 1.4889643463497453, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7348958', 'n_tokens_mistral': 578, 'n_tokens_neox': 547, 'n_words': 115}