#!/bin/bash
#核心程序路径
HOME_DIR="/home/panProject/Server"
#weblogic路径(以weblogic发布为例)
WEBLGIC_ZJ="/home/weblogic/Oracle/user_projects/domains/domain/bin"
#cd $GLASSFISH_DIR
#./asadmin stop-domain domainzjnew >> /home/soft/sh.log
#sleep 30
#记录当前时间
dangDATE1=$(date “+%Y-%m-%d %H:%M:%S”)
echo $dangDATE1 >> /home/soft/sh.log
#进入核心程序
cd $HOME_DIR
#check_result=git pull
check_result=$(git pull 2>&1)
echo “check command(git pull) available results are: $check_result”
echo $check_result >> /home/soft/sh.log
if [[ c h e c k r e s u l t = m e r g e ] ] t h e n e c h o " 拉 取 冲 突 " > > / h o m e / s o f t / s h . l o g g i t f e t c h − − a l l > > / h o m e / s o f t / s h . l o g s l e e p 5 e c h o " 强 制 获 取 更 新 " > > / h o m e / s o f t / s h . l o g g