Index: usr.sbin/freebsd-update/freebsd-update.sh =================================================================== --- usr.sbin/freebsd-update/freebsd-update.sh +++ usr.sbin/freebsd-update/freebsd-update.sh @@ -2521,19 +2521,6 @@ mv $2 $3 } -# Helper for upgrade_merge: Return zero true iff the two files differ only -# in the contents of their RCS tags. -samef () { - X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` - Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` - - if [ $X = $Y ]; then - return 0; - else - return 1; - fi -} - # From the list of "old" files in $1, merge changes in $2 with those in $3, # and update $3 to reflect the hashes of merged files. upgrade_merge () { @@ -2620,7 +2607,7 @@ # If the installed file differs from the version in # the old release only due to RCS tag expansion # then just use the version in the new release. - if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then + if cmp -s merge/old/${F} merge/${OLDRELNUM}/${F}; then cp merge/${RELNUM}/${F} merge/new/${F} continue fi @@ -2660,7 +2647,7 @@ # Skip files which haven't changed except possibly # in their RCS tags. if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && - samef merge/old/${F} merge/new/${F}; then + cmp -s merge/old/${F} merge/new/${F}; then continue fi @@ -2668,7 +2655,7 @@ # the old file only due to RCS tags. if [ -f merge/old/${F} ] && [ -f merge/${OLDRELNUM}/${F} ] && - samef merge/old/${F} merge/${OLDRELNUM}/${F}; then + cmp -s merge/old/${F} merge/${OLDRELNUM}/${F}; then continue fi