<commit_before>#!/bin/sh

# Script to publish WINE@Etersoft in LINUX@Etersoft distro

# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/korinf/common

PROJECTVERSION=$1
[ -n "$PROJECTVERSION" ] || PROJECTVERSION=last

[ -n "$BUILDNAME" ] || BUILDNAME=wine-etersoft

SOURCEPATH=$WINEPUB_PATH/$PROJECTVERSION/sources

if [ -z "$VERSION" ] ; then
	BUILDSRPM="$SOURCEPATH/$(ls -1 $SOURCEPATH/$BUILDNAME-[0-9]*.src.rpm | last_rpm).src.rpm"
	# -   
	echo $BUILDSRPM
	VERSION=`rpm -qp --queryformat "%{VERSION}" $BUILDSRPM`
	#RELEASE=`rpm -qp --queryformat "%{RELEASE}" $BUILDSRPM`
fi

# FROM TARGET
copy_to()
{
	local FPU="$WINEPUB_PATH/$PROJECTVERSION/WINE/$1"
	local TP="$2/i586/RPMS.nonfree"

	cd "$FPU" || fatal "Can't cd"
	LIST=
	for i in wine-etersoft ; do
		LIST="$LIST $i-$VERSION-*.*.rpm"
		rm -fv $TP/$i-[0-9]*.rpm
	done

	for i in wine-etersoft-gl ; do
		LIST="$LIST extra/$i-$VERSION-*.*.rpm"
		rm -fv $TP/$i-[0-9]*.rpm
	done

	cp -fv $LIST $TP

	local FPV="$WINEETER_PATH/$PROJECTVERSION/WINE-SQL/$1"
	cd "$FPV" || fatal "Can't cd"
	LIST=
	for i in wine-etersoft-sql ; do
		LIST="$LIST $i-$VERSION-*.*.rpm"
		rm -fv $TP/$i-[0-9]*.rpm
	done
	cp -fv $LIST $TP

	local FPV="$WINEETER_PATH/$PROJECTVERSION/WINE-Network/$1"
	cd "$FPV" || fatal "Can't cd"
	LIST=
	for i in wine-etersoft-network ; do
		LIST="$LIST $i-$VERSION-*.*.rpm"
		rm -fv $TP/$i-[0-9]*.rpm
	done
	cp -fv $LIST $TP

	local FPV="$WINEETER_PATH/$PROJECTVERSION/WINE-Local/$1"
	cd "$FPV" || fatal "Can't cd"
	LIST=
	for i in wine-etersoft-local ; do
		LIST="$LIST $i-$VERSION-*.*.rpm"
		rm -fv $TP/$i-[0-9]*.rpm
	done
	cp -fv $LIST $TP

	genbasedir -v --topdir=$2 i586 nonfree
}

copy_to ALTLinux/4.1 /var/ftp/pub/Etersoft/LINUX@Etersoft/4.1/branch
copy_to ALTLinux/5.0 /var/ftp/pub/Etersoft/LINUX@Etersoft/5.0/branch
copy_to ALTLinux/Sisyphus /var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus
<commit_msg>rewrite publish script<commit_after>#!/bin/sh

# Script to publish WINE@Etersoft in LINUX@Etersoft distro

# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/korinf/common

PROJECTVERSION=$1
[ -n "$PROJECTVERSION" ] || PROJECTVERSION=last

[ -n "$BUILDNAME" ] || BUILDNAME=wine-etersoft

SOURCEPATH=$WINEPUB_PATH/$PROJECTVERSION/sources

add_and_remove()
{
	local i=$2
	cd $1 || fatal "Can't cd"
	ls -l
	local LIST="$i-[0-9]*.*.rpm"
	rm -fv $TP/$i-[0-9]*.rpm
	cp -fv $LIST $TP
	cd - >/dev/null
}

# FROM TARGET
copy_to()
{
	local FPU="$WINEPUB_PATH/$PROJECTVERSION/WINE/$1"
	local TP="$2/i586/RPMS.nonfree"

	add_and_remove "$FPU" wine-etersoft
	add_and_remove "$FPU/extra" wine-etersoft-gl

	add_and_remove "$FPU" haspd
	add_and_remove "$FPU" haspd-modules

	add_and_remove "$WINEETER_PATH/$PROJECTVERSION/WINE-SQL/$1" wine-etersoft-sql
	add_and_remove "$WINEETER_PATH/$PROJECTVERSION/WINE-Network/$1" wine-etersoft-network
	add_and_remove "$WINEETER_PATH/$PROJECTVERSION/WINE-Local/$1" wine-etersoft-local

	genbasedir -v --topdir=$2 i586 nonfree
}

copy_to ALTLinux/4.1 /var/ftp/pub/Etersoft/LINUX@Etersoft/4.1/branch
copy_to ALTLinux/5.0 /var/ftp/pub/Etersoft/LINUX@Etersoft/5.0/branch
copy_to ALTLinux/Sisyphus /var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus

{'fraction_non_alphanumeric': 0.17367119901112485, 'fraction_numerical': 0.01946847960444994, 'mean_word_length': 4.113744075829384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1267983', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1369, 'n_words': 262}