File: try

package info (click to toggle)
ldapvi 1.7-11.2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,204 kB
  • sloc: ansic: 6,536; xml: 1,331; sh: 194; makefile: 16
file content (18 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e
doit() {
	echo "* $1"
	../ldapvi --diff $1.a $1.b >$1.out || echo FAILED
	if test -f $1.wanted; then
		diff -u $1.wanted $1.out || echo FAILED
	else
		echo creating $1.wanted
		mv $1.out $1.wanted
		cat $1.wanted
	fi
}

if test x$1 = x; then
	ls -1 ???.a | cut -d. -f1 | while read t; do doit $t; done
else
	doit $1
fi