3 # The olsr.org Optimized Link-State Routing daemon (olsrd)
5 # (c) by the OLSR project
7 # See our Git repository to find out who worked on this file
8 # and thus is a copyright holder on it.
10 # All rights reserved.
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
16 # * Redistributions of source code must retain the above copyright
17 # notice, this list of conditions and the following disclaimer.
18 # * Redistributions in binary form must reproduce the above copyright
19 # notice, this list of conditions and the following disclaimer in
20 # the documentation and/or other materials provided with the
22 # * Neither the name of olsr.org, olsrd nor the names of its
23 # contributors may be used to endorse or promote products derived
24 # from this software without specific prior written permission.
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
29 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
30 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
32 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 # POSSIBILITY OF SUCH DAMAGE.
39 # Visit http://www.olsr.org for more information.
41 # If you find this software useful feel free to make a donation
42 # to the project. For more information see the website or contact
43 # the copyright holders.
46 test -f ${0%/*}/src/cfgparser/oparse.c && {
48 This script reformats all source files. Be careful
49 with doing so. You need a clean source tree, e.g.
50 reformatting of bison/flex output may not work well.
52 For these reasons: run "make uberclean" first.
56 test -x $PWD/${0##*/} || {
58 ************************************************************
59 Warning: about to change all files below current working dir
61 ************************************************************
65 test "y" = "$l" || exit 1
68 sed -i 's/Andreas T.\{1,6\}nnesen/Andreas Tonnesen/g;s/Andreas Tønnesen/Andreas Tonnesen/g;s/Andreas Tønmnesen/Andreas Tonnesen/' $(find -type f -not -path "*/.hg*" -not -name ${0##*/})
69 sed -i 's/
\r//g;s/[ ]\+$//' $(find -name "*.[ch]" -not -path "*/.hg*")
72 test "--cmp" = "$1" && {
73 # Note: may help to compare two messy formatted source trees.
74 addon="--swallow-optional-blank-lines --ignore-newlines"
77 indent $(cat ${0%/*}/src/.indent.pro) $addon $* $(find -name "*.[ch]" -not -path "*/.hg*")
79 rm $(find -name "*~" -not -path "*/.hg*")