`
zhengdl126
  • 浏览: 2511867 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类

增量文件内容other.php

 
阅读更多

 

 

 

 

#增量文件内容other.php
if [[ "${sc_auth}" == "sc" ]] && [[ "${fabu}" == "fabu" ]];then
if [ -d "${tmp_path}/${update_other_dir}/${environ}" ] ;then
  for file in ` ls $tmp_path"/"$update_other_dir"/"$environ `
  do
    if [ -d $tmp_path"/"$update_other_dir"/"$environ"/"$file ] ;then
      continue
    else
      #判断是否重复包含内容(对比时剔除空格换行
      text_update=`cat $tmp_path"/"$update_other_dir"/"$environ"/"$file | tr -s "\n" | tr -d "\n\t" | tr -d "\r"`

      text_other=`cat ${www_path}"/"${otherphp} | tr -s "\n" | tr -d "\n\t" | tr -d "\r"`

      #echo "${text_other}" | grep -F "${text_update}" > /dev/null && continue || `cat $tmp_path"/"$update_other_dir"/"$environ"/"$file >> "${www_path}/${otherphp}"`
      echo "${text_other}" | grep -F "${text_update}" > /dev/null && otherinc="true" ||  otherinc="false"

      if [ "$otherinc" == "false" ] ;then
          `cat $tmp_path"/"$update_other_dir"/"$environ"/"$file >> "${www_path}/${otherphp}"`
      fi
    fi
  done
fi
fi

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics