Revision 1.36 Revision 1.37
4 4
6# @MAINTAINER: 6# @MAINTAINER:
8# @AUTHOR: 8# @AUTHOR:
578 orig_c=\$(< "\$cf") 578 orig_c=\$(< "\$cf")
579 579
580 while :; do 580 while :; do
581 from_pat=\$1 581 from_pat=\$1
582 to_str=\$2 582 to_str=\$2
583 einfo "CHDEP: '\${from_pat}' -> '\${to_str}'"
584 583
585 [[ -n \${from_pat} ]] || break 584 [[ -n \${from_pat} ]] || break
586 [[ -n \${to_str} ]] || die "'\${from_str}' does not have 'to' part" 585 [[ -n \${to_str} ]] || die "'\${from_str}' does not have 'to' part"
586
587 einfo "CHDEP: '\${from_pat}' -> '\${to_str}'"
587 588
588 # escape pattern-like symbols 589 # escape pattern-like symbols
589 from_pat=\${from_pat//\*/\\*} 590 from_pat=\${from_pat//\*/\\*}
590 from_pat=\${from_pat//\[/\\[} 591 from_pat=\${from_pat//\[/\\[}
591 592
595 echo "\${orig_c}" >"\${T}/\${cf}".pre 596 echo "\${orig_c}" >"\${T}/\${cf}".pre
596 echo "\${new_c}" >"\${T}/\${cf}".post 597 echo "\${new_c}" >"\${T}/\${cf}".post
597 diff -u "\${T}/\${cf}".{pre,post} 598 diff -u "\${T}/\${cf}".{pre,post}
598 fi 599 fi
599 600
600 [[ "\${orig_c}" == "\${new_c}" ]] && die "no trigger for '\${from_ss}'" 601 [[ "\${orig_c}" == "\${new_c}" ]] && die "no trigger for '\${from_pat}'"
601 orig_c=\${new_c} 602 orig_c=\${new_c}
602 shift 603 shift
603 shift 604 shift
604 done 605 done
605 606

Legend:
 Removed from v.1.36 changed lines Added in v.1.37