增量文件内容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

 

你可能感兴趣的:(PHP)