<commit_before>#!/bin/sh

#argument 1 is the current version being released
VERSION=$1
#argument 2 is the temp directory where Scheduling_full directory and RCPs archives must be (/tmp)
TMP_DIR=/tmp
if [ ! -z "$2" ] ; then
	TMP_DIR=`readlink -f $2`
fi

#############################################################################

# name of the directory that contains the full scheduling content  (also set in release-prepare.sh)
SCHEDULING_FULL_NAME=Scheduling-${VERSION}_full
# name of the uncompressed directory coming from compressed RCP archive
SCHEDULING_CONTENT_DIR_NAME=Scheduling-${VERSION}-RCP
RESOURCING_CONTENT_DIR_NAME=Resourcing-${VERSION}-RCP

# releases names will be : ${PREFIX}${VERSION}$[SUFFIX}.ext
# and for RCPs :           ${PREFIX}${VERSION}$[SUFFIX}[os.type.arch].ext

PREFIX_API_SC=ProActiveScheduling-
PREFIX_API_RM=ProActiveResourcing-
PREFIX_RCP_SC=ProActiveScheduling-
PREFIX_RCP_RM=ProActiveResourcing-
PREFIX_SRC=ProActiveSchedulingResourcing-

SUFFIX_SRC=_src
SUFFIX_SERVER=_server
SUFFIX_WORKER=_worker
SUFFIX_CLIENT_API=_client-API
SUFFIX_CLIENT_API_FULL=_client-API-full
SUFFIX_CLIENT_API_MATSCI=_client-API-matlab-scilab
SUFFIX_CLIENT_API_MAPREDUCE=_client-API-mapreduce

SUFFIX_CLIENT_RCPs=_client-RCP-

#############################################################################
#############################################################################

function del_dist(){
	rm -rf dist
}

function del_src(){
	rm -rf compile lib rm-rcp scheduler-rcp scripts src
	rm -rf doc/src doc/toolchain doc/tmp
}

function del_client(){
	rm -rf compile lib rm-rcp scheduler-rcp scripts src
	rm -rf doc/src doc/toolchain
	rm -rf doc/built/Resourcing
	rm -rf samples/scripts/deployment
	rm RM-README.txt
	rm bin/**/rm* bin/**/*start*
	rm -rf config/authentication/*.cfg config/authentication/jaas.config config/authentication/keys
	rm config/log4j/log4j-defaultNode config/log4j/*server
	rm -rf config/rm config/scheduler
	rm config/security.java.policy-server
	rm dist/lib/*ResourceManager* dist/lib/ProActive_Scheduler-fsm.jar
	rm dist/lib/derby* dist/lib/hibernate-core.jar dist/lib/mysql-connector-java-5.1.16-bin.jar dist/lib/virtual* dist/lib/j-interop*.jar dist/lib/xenserver-5.0.0-3.jar
}

function del_matsci() {
	rm -rf extensions/matlab extensions/scilab
	rm -rf samples/jobs_descriptors/job_scilab
	rm samples/scripts/selection/*lab.xml
	rm dist/lib/*matlab* dist/lib/*scilab* dist/lib/ProActive_LicenseSaver*.jar
	rm dist/lib/ProActive_Scheduler-matsci.jar
}

function del_mapreduce() {
	rm -rf extensions/mapreduce
	rm -rf samples/jobs_descriptors/Workflow/mapreduce
	rm -rf doc/built/MapReduce
	rm dist/lib/hadoop*
	rm dist/lib/ProActive_Scheduler-mapreduce.jar
}

function del_scheduler() {
	#removing all files related to the scheduler
	rm -rf .project
	rm -rf .classpath
	rm -rf README.txt
	rm -rf extensions
	rm -rf samples/jobs_descriptors
	rm -rf samples/munin
	rm -rf doc/built/MapReduce doc/built/Scheduling
	#removing src and lib
	del_src
	del_matsci
	del_mapreduce
	find . -name "scheduler*" -exec rm -rf {} \;
	find . -name "matlab*" -exec rm -rf {} \;
	find . -name "scilab*" -exec rm -rf {} \;
	find . -name "mapreduce*" -exec rm -rf {} \;
	mv RM-README.txt README.txt
}

#############################################################################

function warn_print_usage_and_exit {
	echo "$1" 1>&2
	echo "" 1>&2
	echo "Usage: $0 TMP_DIR VERSION" 1>&2
	echo "       TMP_DIR : directory containing scheduling-full and RCP archives" 1>&2
	echo "       VERSION : current version to be released" 1>&2
	exit 1
}

function cp_r_full(){<commit_msg>SCHEDULING-1366 display usage with expected parameters in the right order<commit_after>#!/bin/sh

#argument 1 is the current version being released
VERSION=$1
#argument 2 is the temp directory where Scheduling_full directory and RCPs archives must be (/tmp)
TMP_DIR=/tmp
if [ ! -z "$2" ] ; then
	TMP_DIR=`readlink -f $2`
fi

#############################################################################

# name of the directory that contains the full scheduling content  (also set in release-prepare.sh)
SCHEDULING_FULL_NAME=Scheduling-${VERSION}_full
# name of the uncompressed directory coming from compressed RCP archive
SCHEDULING_CONTENT_DIR_NAME=Scheduling-${VERSION}-RCP
RESOURCING_CONTENT_DIR_NAME=Resourcing-${VERSION}-RCP

# releases names will be : ${PREFIX}${VERSION}$[SUFFIX}.ext
# and for RCPs :           ${PREFIX}${VERSION}$[SUFFIX}[os.type.arch].ext

PREFIX_API_SC=ProActiveScheduling-
PREFIX_API_RM=ProActiveResourcing-
PREFIX_RCP_SC=ProActiveScheduling-
PREFIX_RCP_RM=ProActiveResourcing-
PREFIX_SRC=ProActiveSchedulingResourcing-

SUFFIX_SRC=_src
SUFFIX_SERVER=_server
SUFFIX_WORKER=_worker
SUFFIX_CLIENT_API=_client-API
SUFFIX_CLIENT_API_FULL=_client-API-full
SUFFIX_CLIENT_API_MATSCI=_client-API-matlab-scilab
SUFFIX_CLIENT_API_MAPREDUCE=_client-API-mapreduce

SUFFIX_CLIENT_RCPs=_client-RCP-

#############################################################################
#############################################################################

function del_dist(){
	rm -rf dist
}

function del_src(){
	rm -rf compile lib rm-rcp scheduler-rcp scripts src
	rm -rf doc/src doc/toolchain doc/tmp
}

function del_client(){
	rm -rf compile lib rm-rcp scheduler-rcp scripts src
	rm -rf doc/src doc/toolchain
	rm -rf doc/built/Resourcing
	rm -rf samples/scripts/deployment
	rm RM-README.txt
	rm bin/**/rm* bin/**/*start*
	rm -rf config/authentication/*.cfg config/authentication/jaas.config config/authentication/keys
	rm config/log4j/log4j-defaultNode config/log4j/*server
	rm -rf config/rm config/scheduler
	rm config/security.java.policy-server
	rm dist/lib/*ResourceManager* dist/lib/ProActive_Scheduler-fsm.jar
	rm dist/lib/derby* dist/lib/hibernate-core.jar dist/lib/mysql-connector-java-5.1.16-bin.jar dist/lib/virtual* dist/lib/j-interop*.jar dist/lib/xenserver-5.0.0-3.jar
}

function del_matsci() {
	rm -rf extensions/matlab extensions/scilab
	rm -rf samples/jobs_descriptors/job_scilab
	rm samples/scripts/selection/*lab.xml
	rm dist/lib/*matlab* dist/lib/*scilab* dist/lib/ProActive_LicenseSaver*.jar
	rm dist/lib/ProActive_Scheduler-matsci.jar
}

function del_mapreduce() {
	rm -rf extensions/mapreduce
	rm -rf samples/jobs_descriptors/Workflow/mapreduce
	rm -rf doc/built/MapReduce
	rm dist/lib/hadoop*
	rm dist/lib/ProActive_Scheduler-mapreduce.jar
}

function del_scheduler() {
	#removing all files related to the scheduler
	rm -rf .project
	rm -rf .classpath
	rm -rf README.txt
	rm -rf extensions
	rm -rf samples/jobs_descriptors
	rm -rf samples/munin
	rm -rf doc/built/MapReduce doc/built/Scheduling
	#removing src and lib
	del_src
	del_matsci
	del_mapreduce
	find . -name "scheduler*" -exec rm -rf {} \;
	find . -name "matlab*" -exec rm -rf {} \;
	find . -name "scilab*" -exec rm -rf {} \;
	find . -name "mapreduce*" -exec rm -rf {} \;
	mv RM-README.txt README.txt
}

#############################################################################

function warn_print_usage_and_exit {
	echo "$1" 1>&2
	echo "" 1>&2
	echo "Usage: $0 VERSION TMP_DIR" 1>&2
	echo "       VERSION : current version to be released" 1>&2
	echo "       TMP_DIR : directory containing scheduling-full and RCP archives" 1>&2
	exit 1
}

function cp_r_full(){
{'fraction_non_alphanumeric': 0.1853021978021978, 'fraction_numerical': 0.008516483516483516, 'mean_word_length': 4.992592592592593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4865839', 'n_tokens_mistral': 2552, 'n_tokens_neox': 2471, 'n_words': 574}