PPSS passess the test case...

This commit is contained in:
Louwrentius 2010-07-17 20:26:28 +00:00
parent ecc9d3da3b
commit c220353e7e
1 changed files with 19 additions and 8 deletions

27
ppss
View File

@ -1529,10 +1529,6 @@ lock_item () {
log DEBUG "Locking item $ITEM_LOCK_FILE"
exec_cmd "mkdir $ITEM_LOCK_FILE >> /dev/null 2>&1"
ERROR="$?"
if [ "$ERROR" = "0" ]
then
exec_cmd "echo "$ITEM" > $ITEM_LOCK_FILE/item.txt"
fi
return "$ERROR"
}
@ -1567,10 +1563,14 @@ release_input_lock () {
list_all_input_items () {
for x in `cat $LISTOFITEMS`
oldIFS=$IFS # save the field separator
IFS=$'\n' # new field separator, the end of line
while read line
do
echo "$x"
done
echo "$line"
done < "$LISTOFITEMS"
IFS="$oldIFS"
}
return_difference_between_vars () {
@ -1607,6 +1607,11 @@ remove_processed_items_from_input_file () {
#
UNPROCESSED_ITEMS=""
if [ -z "$PROCESSED_ITEMS" ]
then
return 1
fi
if [ "$MODE" = "status" ]
then
return 1
@ -1626,7 +1631,11 @@ remove_processed_items_from_input_file () {
fi
INPUTFILES=`list_all_input_items`
log DEBUG "$PROCESSED_ITEMS"
log DEBUG "->> $INPUTFILES"
log DEBUG "-<< $PROCESSED_ITEMS"
oldIFS=$IFS # save the field separator
IFS=$'\n' # new field separator, the end of line
for x in $INPUTFILES
do
@ -1648,6 +1657,8 @@ remove_processed_items_from_input_file () {
log DEBUG "ITEM $x is already processed!."
fi
done
IFS="$oldIFS"
echo "$UNPROCESSED_ITEMS"
echo "$UNPROCESSED_ITEMS" > "$LISTOFITEMS"
}