#!/bin/bash
METHODE=hashes
flag=$TMP_PATH/${METHODE}_bot.flag
date=`date +%Y%m%d0000`

if [ -f $flag ];
then
  echo "${METHODE}_bot is already running !"
  exit 0
fi
touch $flag

cd $APPS_PATH/methode/$METHODE
for BLOCK in `awk '{print $2}' $DATA_PATH/block_list.txt`
do
  if [ ! -f $DATA_PATH/$METHODE/$BLOCK.png ]
  then
    php robot.php $BLOCK 99999
  fi
done

rm -f $flag
