Revert r50287: the P1 dissector isn't clean yet ('dissect_p1_T_report_type' defined...
[metze/wireshark/wip.git] / tools / svnadd
1 #!/bin/sh
2
3 #
4 # Originally written by LEGO, no copyright notice included.
5 # Copyright 2012 Jeff Morriss <jeff.morriss.ws [AT] gmail.com>
6 #
7 # A little shell script to make it easy to set the appropriate SVN properties.
8 #
9 # $Id$
10 #
11 # Wireshark - Network traffic analyzer
12 # By Gerald Combs <gerald@wireshark.org>
13 # Copyright 1998 Gerald Combs
14 #
15 # This program is free software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License
17 # as published by the Free Software Foundation; either version 2
18 # of the License, or (at your option) any later version.
19 #
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 # GNU General Public License for more details.
24 #
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #
29
30 for file in $*
31 do
32         if [ ! -r "$file" ]
33         then
34                 printf "ERROR: No such file: $file.  Skipping it.\n"
35                 continue
36         fi
37
38         # TODO: a command-line option to skip this step (to allow this script
39         # to fix svn properties too).
40         svn add $file
41
42         case "$file" in
43                 *.asciidoc|*.dox|*.txt)
44                         svn ps svn:keywords Id $file
45                         svn ps svn:eol-style native $file
46                         svn ps svn:mime-type text/plain $file
47                         ;;
48                 *.png)
49                         svn ps svn:mime-type image/png $file
50                         ;;
51                 *.svg)
52                         svn ps svn:mime-type image/svg+xml $file
53                         ;;
54                 *.ico)
55                         svn ps svn:mime-type image/x-icon $file
56                         ;;
57                 *.xpm)
58                         svn ps svn:eol-style native $file
59                         ;;
60                 *.pcapng)
61                         # http://seclists.org/tcpdump/2011/q2/4 says that PCAP-NG
62                         # files should not use application/vnd.tcpdump.pcap
63                         svn ps svn:mime-type application/octet-stream $file
64                         ;;
65                 *.pcap)
66                         svn ps svn:mime-type application/vnd.tcpdump.pcap $file
67                         ;;
68                 *.gz)
69                         svn ps svn:mime-type application/x-gzip $file
70                         ;;
71                 *.ts|*.ui|*.xml)
72                         svn ps svn:keywords Id $file
73                         svn ps svn:eol-style native $file
74                         svn ps svn:mime-type text/xml $file
75                         ;;
76                 *.dtd)
77                         svn ps svn:keywords Id $file
78                         svn ps svn:eol-style native $file
79                         ;;
80                 *.pl|*.bat|*.py|*.sh|*.cmd)
81                         svn ps svn:keywords Id $file
82                         svn ps svn:executable '*' $file
83                         svn ps svn:eol-style native $file
84                         ;;
85                 *)
86                         svn ps svn:keywords Id $file
87                         svn ps svn:eol-style native $file
88                         ;;
89         esac
90 done