diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-06-04 22:41:27 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-06-04 22:41:27 +0000 |
| commit | a85e39030f8c7faa3d5a33373389440de6f0fff7 (patch) | |
| tree | ce36c8c318664e92b54f7dd7f31c65eb5758800e | |
| parent | 823d00b2d447247f1c5860e3bbc61f6fd19a70e5 (diff) | |
etcupdate: Make diff -l actually work
While here, remove unnecessary blank lines.
MFC after: 1 week
Fixes: 6d65c91b9a47 ("etcupdate: fix arguments order of diff command")
Reviewed by: Boris Lytochkin <lytboris@gmail.com>
Differential Revision: https://reviews.freebsd.org/D57330
| -rwxr-xr-x | usr.sbin/etcupdate/etcupdate.sh | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 3ff11ec836ae..77fd400a624b 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -500,42 +500,32 @@ diffnode() $COMPARE_EQUAL) ;; $COMPARE_ONLYFIRST) - echo echo "Removed: $3" - echo ;; $COMPARE_ONLYSECOND) - echo echo "Added: $3" - echo ;; $COMPARE_DIFFTYPE) first=`file_type $1/$3` second=`file_type $2/$3` - echo echo "Node changed from a $first to a $second: $3" - echo ;; $COMPARE_DIFFLINKS) first=`readlink $1/$file` second=`readlink $2/$file` - echo echo "Link changed: $file" rule "=" echo "-$first" echo "+$second" - echo ;; $COMPARE_DIFFFILES) if [ -n "$difflistonly" ]; then - echo echo "Changed: $3" - echo - break; + else + echo "Index: $3" + rule "=" + diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3 fi - echo "Index: $3" - rule "=" - diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3 ;; esac } |
