diff options
| author | Boris Lytochkin <lytboris@gmail.com> | 2026-04-30 11:31:34 +0000 |
|---|---|---|
| committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2026-04-30 11:31:34 +0000 |
| commit | 6d65c91b9a4743bbffc3508bf754e68b65bbd494 (patch) | |
| tree | dc8177015eff830a78ec194c5fcb23738ae92915 | |
| parent | 226b37dc3ad5641c18f8542c18baea3ea641c5af (diff) | |
| -rw-r--r-- | usr.sbin/etcupdate/etcupdate.8 | 7 | ||||
| -rwxr-xr-x | usr.sbin/etcupdate/etcupdate.sh | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index bf7ddb792907..6216722fc81f 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2024 +.Dd April 30, 2026 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -51,6 +51,7 @@ .Ar tarball .Nm .Cm diff +.Op Fl l .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl I Ar patterns @@ -468,6 +469,10 @@ shell pattern. This option may be specified multiple times to specify multiple patterns. Multiple space-separated patterns may also be specified in a single option. +.It Fl l +In +.Cm diff +mode list files that are changed locally, omit printing content difference. .It Fl L Ar logfile Specify an alternate path for the log file. The diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 8f4737136d72..3ff11ec836ae 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -527,9 +527,15 @@ diffnode() echo ;; $COMPARE_DIFFFILES) + if [ -n "$difflistonly" ]; then + echo + echo "Changed: $3" + echo + break; + fi echo "Index: $3" rule "=" - diff -u $diffargs -L "$3 ($4)" $1/$3 -L "$3 ($5)" $2/$3 + diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3 ;; esac } @@ -1787,11 +1793,15 @@ ignore= nobuild= preworld= noroot= -while getopts "d:m:nprs:t:A:BD:FI:L:M:N" option; do +difflistonly= +while getopts "d:lm:nprs:t:A:BD:FI:L:M:N" option; do case "$option" in d) WORKDIR=$OPTARG ;; + l) + difflistonly=YES + ;; m) MAKE_CMD=$OPTARG ;; |
