25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
683 B

#!/bin/bash
flag=$TMP_PATH/full_spline_bot.flag
date=`date +%Y%m%d0000`
if [ -f $flag ];
then
  echo "full_spline_bot is already running !"
  exit 0
fi
touch $flag
cd $APPS_PATH/methode/full_spline
for BLOCK in `awk '{print $2}' $DATA_PATH/block_list.txt`
do
  if [ ! -f $DATA_PATH/full_spline/$BLOCK.png ]
  then
    php robot.php $BLOCK
  fi
  BNAME=`grep $BLOCK $DATA_PATH/block_list.txt | awk '{print $1}'`
  if [ "$BNAME" == "LAST" ]
  then
    touch $DATA_PATH/full_spline/$BLOCK.png
  else
    touch -t $date $DATA_PATH/full_spline/$BLOCK.png
  fi
  rm -f $DATA_PATH/hasard/$BLOCK.png
  ln $DATA_PATH/full_spline/$BLOCK.png $DATA_PATH/hasard/$BLOCK.png
done
rm -f $flag