Major rework on distributed mode

This commit is contained in:
louwrentius 2011-12-25 01:17:17 +00:00
parent dbd8f51590
commit a06634d450
2 changed files with 19 additions and 5 deletions

16
ppss
View File

@ -2145,19 +2145,34 @@ commando () {
ITEM_DIR_NAME=`dirname "$ITEM" | sed s:$SRC_DIR::g`
ITEM_BASE_NAME=`basename "$ITEM"`
HASH=`echo "$ITEM" | $MD5 | awk '{ print $1 }'`
if [ "$UPLOAD_TO_SERVER" == "1" ]
then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$HASH"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_DIR_NAME"
fi
else
ITEM_DIR_NAME="$SRC_DIR"
ITEM_BASE_NAME="$ITEM"
escape_item "$ITEM_BASE_NAME"
if [ "$UPLOAD_TO_SERVER" == "1" ]
then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$ITEM_ESCAPED"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR"
fi
fi
else
VIRTUAL="1"
ITEM_DIR_NAME=""
ITEM_BASE_NAME="$ITEM"
escape_item "$ITEM_BASE_NAME"
if [ "$UPLOAD_TO_SERVER" == "1" ]
then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$ITEM_ESCAPED"
else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR"
fi
fi
OUTPUT_FILE="$ITEM_BASE_NAME"
@ -2190,7 +2205,6 @@ commando () {
fi
fi
#
# Create the log file containing the output of the command.
#

View File

@ -9,6 +9,6 @@ USER=ppss
SCRIPT=wav2mp3.sh
RANDOMIZE=1
DOWNLOAD_TO_NODE=0
UPLOAD_TO_SERVER=1
UPLOAD_TO_SERVER=0
SECURE_COPY=0
PPSS_DEBUG=1