OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [makecopyright] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
#!/bin/bash
2
 
3
#
4
# makecopyright - put a copyright info into source files
5
# Copyright (C) 2009-2017 ZTEX GmbH., http://www.ztex.de
6
#
7
 
8
filesfile=makecopyright.files
9
 
10
# writes the copyright info to stdout
11
# $1    short description
12
# $2    begin of comment
13
# $3    end of comment
14
gpl () {
15
echo "$2
16
   $1
17
   Copyright (C) 2009-2017 ZTEX GmbH.
18
   http://www.ztex.de
19
 
20
   This program is free software; you can redistribute it and/or modify
21
   it under the terms of the GNU General Public License version 3 as
22
   published by the Free Software Foundation.
23
 
24
   This program is distributed in the hope that it will be useful, but
25
   WITHOUT ANY WARRANTY; without even the implied warranty of
26
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
   General Public License for more details.
28
 
29
   You should have received a copy of the GNU General Public License
30
   along with this program; if not, see http://www.gnu.org/licenses/.
31
$3"
32
}
33
 
34
mpl-gpl () {
35
echo "$2
36
   $1
37
   Copyright (C) 2009-2017 ZTEX GmbH.
38
   http://www.ztex.de
39
 
40
   This Source Code Form is subject to the terms of the Mozilla Public
41
   License, v. 2.0. If a copy of the MPL was not distributed with this file,
42
   You can obtain one at http://mozilla.org/MPL/2.0/.
43
 
44
   Alternatively, the contents of this file may be used under the terms
45
   of the GNU General Public License Version 3, as described below:
46
 
47
   This program is free software; you can redistribute it and/or modify
48
   it under the terms of the GNU General Public License version 3 as
49
   published by the Free Software Foundation.
50
 
51
   This program is distributed in the hope that it will be useful, but
52
   WITHOUT ANY WARRANTY; without even the implied warranty of
53
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
54
   General Public License for more details.
55
 
56
   You should have received a copy of the GNU General Public License
57
   along with this program; if not, see http://www.gnu.org/licenses/.
58
$3"
59
}
60
 
61
shl () {
62
echo "$2
63
   $1
64
   Copyright (C) 2009-2017 ZTEX GmbH.
65
   http://www.ztex.de
66
 
67
   Copyright and related rights are licensed under the Solderpad Hardware
68
   License, Version 0.51 (the \"License\"); you may not use this file except
69
   in compliance with the License. You may obtain a copy of the License at
70
 
71
       http://solderpad.org/licenses/SHL-0.51.
72
 
73
   Unless required by applicable law or agreed to in writing, software, hardware
74
   and materials distributed under this License is distributed on an \"AS IS\"
75
   BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
76
   implied. See the License for the specific language governing permissions
77
   and limitations under the License.
78
$3"
79
}
80
 
81
apc () {
82
echo "$2
83
   $1
84
   Copyright (C) 2009-2017 ZTEX GmbH.
85
   http://www.ztex.de
86
 
87
   Licensed under the Apache License, Version 2.0 (the \"License\");
88
   you may not use this file except in compliance with the License.
89
   You may obtain a copy of the License at
90
 
91
       http://www.apache.org/licenses/LICENSE-2.0
92
 
93
   Unless required by applicable law or agreed to in writing, software
94
   distributed under the License is distributed on an \"AS IS\" BASIS,
95
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
96
   See the License for the specific language governing permissions and
97
   limitations under the License.
98
$3"
99
}
100
 
101
readonly=no
102
 
103
# copyright info for single file
104
# $1    file
105
# $2    short description
106
# $3    begin of comment
107
# $4    end of comment
108
# $5    msg type
109
singlefile () {
110
#    if [ ! -f "$1" -o -f "$1.tmp" ]; then
111
    if [ ! -f "$1" ]; then
112
        return
113
    fi
114
    echo "$1"
115
    if [ "$readonly" = "no" ]; then
116
        mv "$1" "$1.tmp"
117
        (
118
            $5 "$2" "$3" "$4"
119
            echo "@@@define[$3][$4
120
][]" | bmp -mm "@@@" -mp "&" - "$1.tmp"
121
        ) > "$1"
122
        rm -f "$1.tmp"
123
    fi
124
    echo "$1" >> $filesfile
125
}
126
 
127
 
128
# copyright info for single directory
129
# $1    dir(s)
130
# $2    description
131
singledir-examples () {
132
    if [ ! -d $1 ]; then
133
        echo "Directory not found: $1"
134
    fi
135
    for i in $1/*.c $1/*.h $1/*.java; do
136
        singlefile "$i" "$2" "/*%" "%*/" apc
137
    done
138
 
139
    for i in $1/fpga*/*.v; do
140
        singlefile "$i" "$2" "/*%" "%*/" shl
141
    done
142
}
143
 
144
singledir () {
145
    if [ ! -d $1 ]; then
146
        echo "Directory not found: $1"
147
    fi
148
    for i in $1/*.c $1/*.h $1/*.java; do
149
        singlefile "$i" "$2" "/*%" "%*/" mpl-gpl
150
    done
151
}
152
 
153
rm -f $filesfile
154
 
155
 
156
singledir capi/c "ZTEX Core API for C with examples"
157
 
158
singledir-examples default "Common communication interface of default firmwares"
159
singledir-examples default/DefaultUpdater "Utility for automatic updating default firmware"
160
singledir-examples default/usb-fpga-1.15 "Default firmware and loader for ZTEX USB-FPGA Modules 1.15"
161
singledir-examples default/usb-fpga-1.15y "Default firmware and loader for ZTEX USB-FPGA Modules 1.15y"
162
singledir-examples default/usb-fpga-2.01 "Default firmware and loader for ZTEX USB-FPGA Modules 2.01"
163
singledir-examples default/usb-fpga-2.04 "Default firmware and loader for ZTEX USB-FPGA Modules 2.04"
164
singledir-examples default/usb-fpga-2.13 "Default firmware and loader for ZTEX USB-FPGA Modules 2.13"
165
singledir-examples default/usb-fpga-2.14 "Default firmware and loader for ZTEX USB-FPGA Modules 2.14"
166
singledir-examples default/usb-fpga-2.16 "Default firmware and loader for ZTEX USB-FPGA Modules 2.16"
167
singledir-examples default/usb-fpga-2.18 "Default firmware and loader for ZTEX USB-FPGA Modules 2.18"
168
 
169
singledir-examples examples/flashbench "flashbench -- Flash memory benchmark"
170
singledir-examples examples/fx2demo "fx2demo -- Demonstrates common features of the FX2"
171
singledir-examples examples/fx3demo "fx3demo -- Demonstrates common features of the FX3"
172
singledir-examples examples/fx3sdemo "fx3sdemo -- Demonstrates common features of the FX3S"
173
singledir-examples examples/lightshow "lightshow -- A lightshow on Debug Board"
174
singledir-examples examples/memfifo "memfifo -- Connects the bi-directional high speed interface of default firmware to a FIFO built of on-board SDRAM or on-chip BRAM"
175
singledir-examples examples/mmio "mmio -- Memory mapped I/O example for ZTEX USB-FPGA Module 2.16"
176
singledir-examples examples/ucecho "ucecho -- Uppercase conversion example using the low speed interface of default firmware"
177
 
178
singledir fx2 "ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers"
179
 
180
singledir fx3 "ZTEX Firmware Kit for EZ-USB FX3 Microcontrollers"
181
 
182
singledir java/ztex "Java host software API of ZTEX SDK"
183
singledir java/FWLoader "Firmware / Bitstream loader for ZTEX USB-FPGA Modules"
184
singledir java/DeviceServer "DeviceServer for the ZTEX USB-FPGA Modules"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.