<commit_before>#!/bin/bash

# Creates a release branch for all git repositories

initializeWorkingDirAndScriptDir() {
    # Set working directory and remove all symbolic links
    workingDir=`pwd -P`

    # Go the script directory
    cd `dirname $0`
    # If the file itself is a symbolic link (ignoring parent directory links), then follow that link recursively
    # Note that scriptDir=`pwd -P` does not do that and cannot cope with a link directly to the file
    scriptFileBasename=`basename $0`
    while [ -L "$scriptFileBasename" ] ; do
        scriptFileBasename=`readlink $scriptFileBasename` # Follow the link
        cd `dirname $scriptFileBasename`
        scriptFileBasename=`basename $scriptFileBasename`
    done
    # Set script directory and remove other symbolic links (parent directory links)
    scriptDir=`pwd -P`
}
initializeWorkingDirAndScriptDir

if [ $# != 2 ] ; then
    echo
    echo "Usage:"
    echo "  $0 droolsReleaseBranchName jbpmReleaseBranchName"
    echo "For example:"
    echo "  $0 5.2.x 5.1.x"
    echo
    exit 1
fi

echo "The drools, guvnor, ... release branch name is $1"
echo "The jbpm release branch name is $2"
echo -n "Is this ok? (Hit control-c if is not): "
read ok

startDateTime=`date +%s`

droolsjbpmOrganizationDir="$scriptDir/../../.."
cd $droolsjbpmOrganizationDir

for repository in `cat ${scriptDir}/repository-list.txt` ; do
    echo
    if [ -d $droolsjbpmOrganizationDir/$repository ] ; then
        echo "==============================================================================="
        echo "Repository: $repository"
        echo "==============================================================================="
        cd $repository
        releaseBranchName=$1
        if [ $repository = 'jbpm' ]; then
            releaseBranchName=$2
        fi
        git checkout -b $releaseBranchName
        git push origin $releaseBranchName
        # Set up the local branch to track the remote branch
        git branch --set-upstream $releaseBranchName origin/$releaseBranchName
        gitReturnCode=$?
        cd ..<commit_msg>fix repository list file location<commit_after>#!/bin/bash

# Creates a release branch for all git repositories

initializeWorkingDirAndScriptDir() {
    # Set working directory and remove all symbolic links
    workingDir=`pwd -P`

    # Go the script directory
    cd `dirname $0`
    # If the file itself is a symbolic link (ignoring parent directory links), then follow that link recursively
    # Note that scriptDir=`pwd -P` does not do that and cannot cope with a link directly to the file
    scriptFileBasename=`basename $0`
    while [ -L "$scriptFileBasename" ] ; do
        scriptFileBasename=`readlink $scriptFileBasename` # Follow the link
        cd `dirname $scriptFileBasename`
        scriptFileBasename=`basename $scriptFileBasename`
    done
    # Set script directory and remove other symbolic links (parent directory links)
    scriptDir=`pwd -P`
}
initializeWorkingDirAndScriptDir

if [ $# != 2 ] ; then
    echo
    echo "Usage:"
    echo "  $0 droolsReleaseBranchName jbpmReleaseBranchName"
    echo "For example:"
    echo "  $0 5.2.x 5.1.x"
    echo
    exit 1
fi

echo "The drools, guvnor, ... release branch name is $1"
echo "The jbpm release branch name is $2"
echo -n "Is this ok? (Hit control-c if is not): "
read ok

startDateTime=`date +%s`

droolsjbpmOrganizationDir="$scriptDir/../../.."
cd $droolsjbpmOrganizationDir

for repository in `cat ${scriptDir}/../repository-list.txt` ; do
    echo
    if [ -d $droolsjbpmOrganizationDir/$repository ] ; then
        echo "==============================================================================="
        echo "Repository: $repository"
        echo "==============================================================================="
        cd $repository
        releaseBranchName=$1
        if [ $repository = 'jbpm' ]; then
            releaseBranchName=$2
        fi
        git checkout -b $releaseBranchName
        git push origin $releaseBranchName
        # Set up the local branch to track the remote branch
        git branch --set-upstream $releaseBranchName origin/$releaseBranchName
        gitReturnCode=$?
        cd ..
{'fraction_non_alphanumeric': 0.15722077306141807, 'fraction_numerical': 0.006639791320844202, 'mean_word_length': 3.226452905811623, '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': '3821380', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1131, 'n_words': 402}