summaryrefslogtreecommitdiffstats
path: root/tools/vty_index.sh
blob: 0ac8bfb341163809bf3a24aeda7d5568f6ef7308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

sed -e '1istatic void bgp_debug_clear_updgrp_update_dbg(struct bgp *bgp);' -i \
	bgpd/bgp_debug.c
sed -e 's%^#if 0%#if 1 /* 0 */%' -i \
	ospfd/ospf_vty.c \
	ospf6d/ospf6_top.c \
	#
spatch \
	--sp-file    tools/vty_index.cocci \
	--macro-file tools/cocci.h \
	--all-includes -I . -I lib \
	--use-gitgrep --dir . --in-place

sed -e 's%^#if 1 /\* 0 \*/%#if 0%' -i \
	ospfd/ospf_vty.c \
	ospf6d/ospf6_top.c \
	#
sed -e '1d' -i \
	bgpd/bgp_debug.c