#!/bin/bash
export SHELL_HOME_PATH=/home/admin/test/data-integration/xlDataMigration
export LANG=zh_CN.UTF-8
export LOGS=/home/admin/test/data-integration/data/logs
DATE=`date +"%Y%m"`
DAY=`date +"%d"`
TIME=`date +"%H%M%S"`
if [ -d "$LOGS" ];then
echo "$LOGS is OK"
else
mkdir -p $LOGS
echo "$LOGS is created"
fi
if [ -d "$LOGS/$DATE" ];then
echo "$LOGS/$BUSINESS/$DATE is OK"
else
mkdir -p $LOGS/$DATE
echo "$LOGS/$BUSINESS/$DATE is created"
fi
TIME1=`date +"%H%M%S"`
if [[ $? -eq 0 ]];then
sh /home/admin/test/data-integration/kitchen.sh -file=/home/admin/test/data-integration/xlDataMigration/personAndVillageData.ktr.kjb >>$LOGS/$DATE/$DAY/deal_01_new_data_source_00_info_$TIME1.log
echo "excute deal_01_new_data_source_00_info.sh is successful"
else
echo "excute deal_01_new_data_source_00_info.sh is error";
exit 1;
fi