Ok version with fixed file handling when using input file instead of dir

This commit is contained in:
Louwrentius 2009-03-21 20:34:05 +00:00
parent 71e8d829d9
commit 3f6343318a

14
ppss.sh
View File

@ -894,22 +894,22 @@ are_jobs_running () {
download_item () { download_item () {
ITEM_WITH_PATH="$1" ITEM="$1"
ITEM=`basename "$ITEM"` ITEM_NO_PATH=`basename "$ITEM"`
if [ "$TRANSFER_TO_SLAVE" == "1" ] if [ "$TRANSFER_TO_SLAVE" == "1" ]
then then
log DEBUG "Transfering item $ITEM to local disk." log DEBUG "Transfering item $ITEM_NO_PATH to local disk."
if [ "$SECURE_COPY" == "1" ] && [ ! -z "$SSH_SERVER" ] if [ "$SECURE_COPY" == "1" ] && [ ! -z "$SSH_SERVER" ]
then then
scp -q $SSH_OPTS $SSH_KEY $USER@$SSH_SERVER:"$ITEM_WITH_PATH" $PPSS_LOCAL_TMPDIR scp -q $SSH_OPTS $SSH_KEY $USER@$SSH_SERVER:"$ITEM" $PPSS_LOCAL_TMPDIR
log DEBUG "Exit code of remote transfer is $?" log DEBUG "Exit code of remote transfer is $?"
else else
cp "$ITEM_WITH_PATH" $PPSS_LOCAL_TMPDIR cp "$ITEM" $PPSS_LOCAL_TMPDIR
log DEBUG "Exit code of local transfer is $?" log DEBUG "Exit code of local transfer is $?"
fi fi
else else
log DEBUG "No transfer of item $ITEM to local workpath." log DEBUG "No transfer of item $ITEM_NO_PATH to local workpath."
fi fi
} }
@ -1123,8 +1123,6 @@ commando () {
log DEBUG "Processing item $ITEM" log DEBUG "Processing item $ITEM"
log DEBUG "** $INPUT_FILE and $TRANSFER_TO_SLAVE - "
if [ "$TRANSFER_TO_SLAVE" == "0" ] if [ "$TRANSFER_TO_SLAVE" == "0" ]
then then
if [ -z "$SRC_DIR" ] && [ ! -z "$INPUT_FILE" ] if [ -z "$SRC_DIR" ] && [ ! -z "$INPUT_FILE" ]