File: UPDATEDWARFDUMPVERSION.sh

package info (click to toggle)
dwarfutils 20161124-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,800 kB
  • ctags: 5,982
  • sloc: ansic: 60,119; cpp: 3,753; python: 639; makefile: 618; sh: 590; awk: 11
file content (25 lines) | stat: -rw-r--r-- 721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Do not turn on -x here. it will screw things up!
x=`date --rfc-3339=seconds |tr '\n' ' '`
cat > UPD.awk <<\EOF
BEGIN {
if (ARGC <=  2)  {
    print "Bogus use of awk file, requires arg"
    exit 1   
} else  {
    v=ARGV[1]
    ARGV[1]=""
}
}
$0 ~  /#define DW_VERSION_DATE_STR/ { print $1, $2, "\"",v,"\"" }
$0 !~ /^#define DW_VERSION_DATE_STR/ { print $0 }
EOF
awk -f UPD.awk  "$x"  dwarfdump/dwarfdump.c >t
mv t dwarfdump/dwarfdump.c
awk -f UPD.awk  "$x"  dwarfdump/common.c >t
mv t dwarfdump/common.c
awk -f UPD.awk  "$x"  dwarfdump/tag_attr.c >t
mv t dwarfdump/tag_attr.c
awk -f UPD.awk  "$x"  dwarfdump/tag_tree.c >t
mv t dwarfdump/tag_tree.c
awk -f UPD.awk  "$x"  libdwarf/gennames.c >t
mv t libdwarf/gennames.c