<commit_before>#!/bin/sh

# Implements --freshen option in RPM. --freshen is mostly like upgrade, but
# go through each file and make sure the package is actually installed before
# upgrading it. This won't work properly if there are any odd options
# specified (i.e. filenames with " specified). I'm sure some shell-hacker
# out there can fix that <hint, hint>.

if [ $1 = ";" ]; then
    RPM=rpm
    shift
else
    RPM=$1
    shift 2
fi

args="-U"
while [ $# -gt 0 ]; do
    if [ "$1" = "--" ]; then
	break
    fi
    args="$args $1"
    shift
done

if [ $# = 0 ]; then
    exec $RPM $args
fi

args="$args -- "
shift

# Just filenames left now
for n in $*; do
    # if the file doesn't exist, we'll let RPM give the error message
    if [ ! -f $n ]; then
	args="$args $n"
    else
	name=`rpm --qf "%{NAME}" -qp $n`
	$RPM -q $name >/dev/null 2>&1 && args="$args $n"
    fi
done

exec $RPM $args<commit_msg>*** empty log message ***<commit_after>#!/bin/sh

# Implements --freshen option in RPM. --freshen is mostly like upgrade, but
# go through each file and make sure the package is actually installed before
# upgrading it. This won't work properly if there are any odd options
# specified (i.e. filenames with " specified). I'm sure some shell-hacker
# out there can fix that <hint, hint>.

if [ $1 = ";" ]; then
    RPM=rpm
    shift
else
    RPM=$1
    shift 2
fi

args="-U"
while [ $# -gt 0 ]; do
    if [ "$1" = "--" ]; then
	break
    fi
    args="$args $1"
    shift
done

if [ $# = 0 ]; then
    exec $RPM $args
fi

args="$args -- "
shift

# Just filenames left now
for n in $*; do
    # if the file doesn't exist, we'll let RPM give the error message
    if [ ! -f $n ]; then
	args="$args $n"
    else
	if ! rpm -q `rpm -qp $n` >/dev/null 2>&1; then
	    name=`rpm --qf "%{NAME}" -qp $n`
	    $RPM -q $name >/dev/null 2>&1 && args="$args $n"
	fi
    fi
done

exec $RPM $args
{'fraction_non_alphanumeric': 0.14846235418875928, 'fraction_numerical': 0.010604453870625663, 'mean_word_length': 2.58745247148289, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2312733', 'n_tokens_mistral': 713, 'n_tokens_neox': 679, 'n_words': 273}