Witness: enum witness_notifyResponse_type
[wireshark-wip.git] / tools / svnadd
blobf2a7fe60bed02f032b5932d79240d894346e844b
1 #!/bin/sh
4 # Originally written by LEGO, no copyright notice included.
5 # Copyright 2012 Jeff Morriss <jeff.morriss.ws [AT] gmail.com>
7 # A little shell script to make it easy to set the appropriate SVN properties.
9 # $Id$
11 # Wireshark - Network traffic analyzer
12 # By Gerald Combs <gerald@wireshark.org>
13 # Copyright 1998 Gerald Combs
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.
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.
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.
30 for file in $*
32 if [ ! -r "$file" ]
33 then
34 printf "ERROR: No such file: $file. Skipping it.\n"
35 continue
38 # TODO: a command-line option to skip this step (to allow this script
39 # to fix svn properties too).
40 svn add $file
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
48 *.rtf)
49 svn ps svn:mime-type text/rtf $file
51 *.png)
52 svn ps svn:mime-type image/png $file
54 *.svg)
55 svn ps svn:mime-type image/svg+xml $file
57 *.ico)
58 svn ps svn:mime-type image/x-icon $file
60 *.xpm|*.pod)
61 svn ps svn:eol-style native $file
63 *.pcapng)
64 # http://seclists.org/tcpdump/2011/q2/4 says that PCAP-NG
65 # files should not use application/vnd.tcpdump.pcap
66 svn ps svn:mime-type application/octet-stream $file
68 *.pcap)
69 svn ps svn:mime-type application/vnd.tcpdump.pcap $file
71 *.qm)
72 svn ps svn:mime-type application/octet-stream $file
74 *.gz)
75 svn ps svn:mime-type application/x-gzip $file
77 *.ts|*.ui|*.xml)
78 svn ps svn:keywords Id $file
79 svn ps svn:eol-style native $file
80 svn ps svn:mime-type text/xml $file
82 *.pl|*.bat|*.py|*.sh|*.cmd)
83 svn ps svn:keywords Id $file
84 svn ps svn:eol-style native $file
85 svn ps svn:executable '*' $file
87 *) # includes *.dtd|*.c|*.h|*.cpp|*.m4|*.asn
88 svn ps svn:keywords Id $file
89 svn ps svn:eol-style native $file
91 esac
92 done