checkflist revision 1.12
11.3Smikel#! /bin/sh -- 21.3Smikel# 31.12Sabs# $NetBSD: checkflist,v 1.12 2000/01/06 21:03:34 abs Exp $ 41.3Smikel# 51.3Smikel# Verify output of makeflist against contents of $DESTDIR. 61.1Scgd 71.3Smikel[ "$DESTDIR" ] || { 81.1Scgd echo DESTDIR must be set 91.1Scgd exit 1 101.3Smikel} 111.1Scgd 121.9Srossorigin=. 131.9Srosstmpname=/tmp/_CHECK.$$ 141.10Sperry 151.10Sperryxargs="" 161.10Sperrydargs="" 171.12Sabsdiffargs="" 181.10Sperry 191.10Sperry# handle args 201.10Sperrywhile : ; do 211.10Sperry case $1 in 221.10Sperry -x11) 231.10Sperry xargs="-x" 241.10Sperry origin=./usr/X11R6 251.10Sperry ;; 261.10Sperry -both) 271.10Sperry xargs="-b" 281.10Sperry ;; 291.10Sperry -secr) 301.10Sperry dargs="-d" 311.10Sperry ;; 321.11Smrg -cryptint) 331.11Smrg dargs="-i" 341.11Smrg ;; 351.12Sabs -u) 361.12Sabs diffargs="-u" 371.12Sabs ;; 381.12Sabs -c) 391.12Sabs diffargs="-c" 401.12Sabs ;; 411.10Sperry -*) 421.10Sperry cat 1>&2 <<USAGE 431.10SperryUsage: $0 [-x11|-both] [-secr] 441.10Sperry -x11 check only x11 lists 451.10Sperry -both check netbsd + x11 lists 461.10Sperry -secr check domestic ("secr") lists 471.11Smrg -cryptint check international crypto ("cryptint") lists 481.12Sabs -u output differences in "unified diff" style 491.12Sabs -c output differences in "context diff" style 501.10SperryUSAGE 511.10Sperry exit 1 521.10Sperry ;; 531.10Sperry *) 541.10Sperry break 551.10Sperry ;; 561.10Sperry esac 571.10Sperry shift 581.10Sperrydone 591.10Sperry 601.10Sperrysh makeflist $xargs $dargs > $tmpname 611.10Sperry 621.9Sross( cd $DESTDIR ; find $origin \( -type d -o -type f -o -type l \) ) | sort | \ 631.12Sabs diff $diffargs $tmpname - 641.9Sross/bin/rm -f $tmpname 65