Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

34 lignes
751 B

#!/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 `grep LAST $DATA_PATH/block_list.txt | awk '{print $2}'`
do
  if [ ! -f $DATA_PATH/$METHODE/$BLOCK.png ]
  then
    BLOCK_HEIGHT=`grep $BLOCK $DATA_PATH/block_list.txt | awk '{print $3}'`
    php robot.php $BLOCK $((RANDOM % 6))
    echo $BLOCK_HEIGHT $BLOCK >> $DATA_PATH/hashes2hashes/liste.txt
  fi
  BNAME=`grep $BLOCK $DATA_PATH/block_list.txt | awk '{print $1}'`
  if [ "$BNAME" == "LAST" ]
  then
    touch $DATA_PATH/$METHODE/$BLOCK.png
  else
    touch -t $date $DATA_PATH/$METHODE/$BLOCK.png
  fi
done
rm -f $flag