build: do not install catalogs on glade-ui not found
[adg.git] / nodist / copyright
blob6306418d10d2ef23ea500e3e55c58e174d553509
1 #!/bin/sh
3 error() {
4 [ -n "$1" ] && printf "$1\n" > /dev/stderr
5 cat <<EOT
6 Usage: $0 [NEW COPYRIGHT]
7 Show or update all copyright comments in source files.
8 EOT
11 [ -n "$2" ] &&
12 error "Too many arguments" &&
13 exit 1
15 [ -z "$1" ] &&
16 find . -name "*.[hc]" -exec cat {} \; | grep Copyright | uniq &&
17 exit 0
19 replace=$(sed 's/[&/\]/\\&/g' <<<"$1")
21 find . -name "*.[hc]" -exec sed -i "s/.*Copyright.*/$replace/" {} \;