File: imf-diff.sh

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (22 lines) | stat: -rwxr-xr-x 567 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

grep -h '(imf ' ../lib/*.imf |
sed -e 's/^(imf "\([-a-z0-9]*\)".*$/\1/' |
sort |
uniq >imf.defs

grep -h '(emblem-name ' ../lib/*.g |
sed -e 's/^.*(emblem-name "\([-a-z0-9]*\)").*$/\1/'  >bar
grep -h '(image-name ' ../lib/*.g |
sed -e 's/^.*(image-name "\([-a-z0-9]*\)").*$/\1/' >barb
grep -h ' image-name ' ../lib/*.g |
sed -e 's/^.* image-name "\([-a-z0-9]*\)").*$/\1/' >barc
cat bar barb barc >barx
sort barx |uniq > imf.uses

echo "Differences between defined and used images"
echo "('<' - definitions,  '>' - uses)"

diff -w imf.defs imf.uses

exit 0