Major rework on distributed mode

This commit is contained in:
louwrentius 2011-12-25 02:08:08 +00:00
parent 74d1e90282
commit 30f92bbae9
2 changed files with 35 additions and 14 deletions

18
ppss
View File

@ -2127,7 +2127,6 @@ commando () {
ERR_STATE="$?"
fi
#
# If recursion is used, a file name of an item may not be unique.
# The same filename can be used for files in differen directories.
@ -2149,7 +2148,12 @@ commando () {
then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$HASH"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_DIR_NAME"
if [ -z "$REMOTE_OUTPUT_DIR" ]
then
OUTPUT_DIR="$PPSS_LOCAL_OUTPUT"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_DIR_NAME"
fi
fi
else
ITEM_DIR_NAME="$SRC_DIR"
@ -2171,7 +2175,12 @@ commando () {
then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$ITEM_ESCAPED"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR"
if [ -z "$REMOTE_OUTPUT_DIR" ]
then
OUTPUT_DIR="$PPSS_LOCAL_OUTPUT"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR"
fi
fi
fi
@ -2230,7 +2239,8 @@ commando () {
then
log DEBUG "Creating local output dir $OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR"
fi
fi
ERROR=""
#

View File

@ -1,7 +1,7 @@
#!/bin/bash
DEBUG="$1"
VERSION="2.90"
VERSION="2.95"
TMP_DIR="/tmp/ppss"
PPSS=./ppss
PPSS_DIR=ppss_dir
@ -26,10 +26,10 @@ cleanup () {
done
fi
if [ ! -z "$TMP_DIR" ]
then
rm -rf "/$TMP_DIR"
fi
if [ ! -z "$TMP_DIR" ] && [ -e "$TMP_DIR" ]
then
rm -rf "$TMP_DIR"
fi
}
parseJobStatus () {
@ -62,7 +62,7 @@ oneTimeSetUp () {
if [ ! -e "$TMP_DIR" ]
then
mkdir "$TMP_DIR"
mkdir -p "$TMP_DIR"
fi
cleanup
@ -96,10 +96,21 @@ createDirectoryWithSomeFiles () {
ROOT_DIR=$TMP_DIR/root
CHILD_1=$ROOT_DIR/child_1
CHILD_2=$ROOT_DIR/child_2
if [ ! -e "$ROOT_DIR" ]
then
mkdir -p "$ROOT_DIR"
fi
mkdir -p "$ROOT_DIR"
mkdir -p "$CHILD_1"
mkdir -p "$CHILD_2"
if [ ! -e "$CHILD_1" ]
then
mkdir -p "$CHILD_1"
fi
if [ ! -e "$CHILD_2" ]
then
mkdir -p "$CHILD_2"
fi
for x in {1..10}
do
@ -228,7 +239,7 @@ testNumberOfLogfiles () {
createSpecialFilenames
init_get_all_items $TMP_DIR/root 1
COMMAND='echo '
COMMAND='echo hoi'
while get_item
do
commando "$ITEM"