<commit_before>#!/bin/bash
# script run inside the container


#/media/src/bin;lib;examples;etc
#/media/VERSIONFILE
VERSIONFILE=/media/VERSION
DISTPATH=/media/src

VERSION=$(cat ${VERSIONFILE})
BLDTMP=/tmp
TMPDIR=${BLDTMP}/OneScript-$VERSION

echo "Copying sources to tmpdir"
cp -r -v $DISTPATH/* $TMPDIR
cp -r -v ${BLDTMP}/oscript $TMPDIR/oscript

pushd ${BLDTMP}
echo "Compressing OneScript-$VERSION to tar"
tar -czvf OneScript-$VERSION.tar.gz OneScript-$VERSION/
popd

BUILDDIR=/media/rpm
mkdir -p ${BUILDDIR}

cp -ra $BUILDTMP/OneScript-$VERSION.tar.gz $BUILDDIR/
cp -rf $BUILDTMP/oscript.spec $BUILDDIR/

rpmdev-setuptree
define=""
if [ -z $VERSION ]; then
    echo ""
else 
   define="${define} --define '_version ${VERSION}'"
fi

if [ -z $RELEASE ]; then
    echo ""
else  
    define='$define --define "Release $RELEASE"'
fi

echo $define
sudo cp -arv $BUILDDIR/* rpmbuild/SOURCES/
sudo cp -arv $BUILDDIR/*.spec rpmbuild/SPECS/ 
rpmbuild -ba \
	--define "_version ${VERSION:-1.0.13}" \
	rpmbuild/SPECS/oscript.spec || exit 1

[[ -d $BUILDDIR ]] || exit 0

sudo mkdir -p $BUILDDIR/RPMS
sudo mkdir -p $BUILDDIR/SRPMS

sudo cp -ar rpmbuild/RPMS/ $BUILDDIR/
sudo cp -ar rpmbuild/SRPMS/ $BUILDDIR/
<commit_msg>Права в RPM сборке<commit_after>#!/bin/bash
# script run inside the container


#/media/src/bin;lib;examples;etc
#/media/VERSIONFILE
VERSIONFILE=/media/VERSION
DISTPATH=/media/src

VERSION=$(cat ${VERSIONFILE})
BLDTMP=/tmp
TMPDIR=${BLDTMP}/OneScript-$VERSION

echo "Copying sources to tmpdir"
cp -r -v $DISTPATH/* $TMPDIR
cp -r -v ${BLDTMP}/oscript $TMPDIR/oscript

pushd ${BLDTMP}
echo "Compressing OneScript-$VERSION to tar"
tar -czvf OneScript-$VERSION.tar.gz OneScript-$VERSION/
popd

BUILDDIR=/media/rpm
sudo mkdir -p ${BUILDDIR}

#cp -ra $BLDTMP/OneScript-$VERSION.tar.gz $BUILDDIR/
#cp -rf $BLDTMP/oscript.spec $BUILDDIR/

rpmdev-setuptree
define=""
if [ -z $VERSION ]; then
    echo ""
else 
   define="${define} --define '_version ${VERSION}'"
fi

if [ -z $RELEASE ]; then
    echo ""
else  
    define='$define --define "Release $RELEASE"'
fi

echo $define
sudo cp -arv $BLDTMP/* rpmbuild/SOURCES/
sudo cp -arv $BLDTMP/*.spec rpmbuild/SPECS/ 
rpmbuild -ba \
	--define "_version ${VERSION:-1.0.13}" \
	rpmbuild/SPECS/oscript.spec || exit 1

[[ -d $BUILDDIR ]] || exit 0

sudo mkdir -p $BUILDDIR/RPMS
sudo mkdir -p $BUILDDIR/SRPMS

sudo cp -ar rpmbuild/RPMS/ $BUILDDIR/
sudo cp -ar rpmbuild/SRPMS/ $BUILDDIR/

{'fraction_non_alphanumeric': 0.15720164609053497, 'fraction_numerical': 0.0049382716049382715, 'mean_word_length': 3.8717434869739478, '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': '7364956', 'n_tokens_mistral': 986, 'n_tokens_neox': 968, 'n_words': 242}