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] - Rev 2
Compare with Previous | Blame | View Log
#!/bin/bash
#
# makecopyright - put a copyright info into source files
# Copyright (C) 2009-2017 ZTEX GmbH., http://www.ztex.de
#
filesfile=makecopyright.files
# writes the copyright info to stdout
# $1 short description
# $2 begin of comment
# $3 end of comment
gpl () {
echo "$2
$1
Copyright (C) 2009-2017 ZTEX GmbH.
http://www.ztex.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see http://www.gnu.org/licenses/.
$3"
}
mpl-gpl () {
echo "$2
$1
Copyright (C) 2009-2017 ZTEX GmbH.
http://www.ztex.de
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.
Alternatively, the contents of this file may be used under the terms
of the GNU General Public License Version 3, as described below:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see http://www.gnu.org/licenses/.
$3"
}
shl () {
echo "$2
$1
Copyright (C) 2009-2017 ZTEX GmbH.
http://www.ztex.de
Copyright and related rights are licensed under the Solderpad Hardware
License, Version 0.51 (the \"License\"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://solderpad.org/licenses/SHL-0.51.
Unless required by applicable law or agreed to in writing, software, hardware
and materials distributed under this License is distributed on an \"AS IS\"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions
and limitations under the License.
$3"
}
apc () {
echo "$2
$1
Copyright (C) 2009-2017 ZTEX GmbH.
http://www.ztex.de
Licensed under the Apache License, Version 2.0 (the \"License\");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an \"AS IS\" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
$3"
}
readonly=no
# copyright info for single file
# $1 file
# $2 short description
# $3 begin of comment
# $4 end of comment
# $5 msg type
singlefile () {
# if [ ! -f "$1" -o -f "$1.tmp" ]; then
if [ ! -f "$1" ]; then
return
fi
echo "$1"
if [ "$readonly" = "no" ]; then
mv "$1" "$1.tmp"
(
$5 "$2" "$3" "$4"
echo "@@@define[$3][$4
][]" | bmp -mm "@@@" -mp "&" - "$1.tmp"
) > "$1"
rm -f "$1.tmp"
fi
echo "$1" >> $filesfile
}
# copyright info for single directory
# $1 dir(s)
# $2 description
singledir-examples () {
if [ ! -d $1 ]; then
echo "Directory not found: $1"
fi
for i in $1/*.c $1/*.h $1/*.java; do
singlefile "$i" "$2" "/*%" "%*/" apc
done
for i in $1/fpga*/*.v; do
singlefile "$i" "$2" "/*%" "%*/" shl
done
}
singledir () {
if [ ! -d $1 ]; then
echo "Directory not found: $1"
fi
for i in $1/*.c $1/*.h $1/*.java; do
singlefile "$i" "$2" "/*%" "%*/" mpl-gpl
done
}
rm -f $filesfile
singledir capi/c "ZTEX Core API for C with examples"
singledir-examples default "Common communication interface of default firmwares"
singledir-examples default/DefaultUpdater "Utility for automatic updating default firmware"
singledir-examples default/usb-fpga-1.15 "Default firmware and loader for ZTEX USB-FPGA Modules 1.15"
singledir-examples default/usb-fpga-1.15y "Default firmware and loader for ZTEX USB-FPGA Modules 1.15y"
singledir-examples default/usb-fpga-2.01 "Default firmware and loader for ZTEX USB-FPGA Modules 2.01"
singledir-examples default/usb-fpga-2.04 "Default firmware and loader for ZTEX USB-FPGA Modules 2.04"
singledir-examples default/usb-fpga-2.13 "Default firmware and loader for ZTEX USB-FPGA Modules 2.13"
singledir-examples default/usb-fpga-2.14 "Default firmware and loader for ZTEX USB-FPGA Modules 2.14"
singledir-examples default/usb-fpga-2.16 "Default firmware and loader for ZTEX USB-FPGA Modules 2.16"
singledir-examples default/usb-fpga-2.18 "Default firmware and loader for ZTEX USB-FPGA Modules 2.18"
singledir-examples examples/flashbench "flashbench -- Flash memory benchmark"
singledir-examples examples/fx2demo "fx2demo -- Demonstrates common features of the FX2"
singledir-examples examples/fx3demo "fx3demo -- Demonstrates common features of the FX3"
singledir-examples examples/fx3sdemo "fx3sdemo -- Demonstrates common features of the FX3S"
singledir-examples examples/lightshow "lightshow -- A lightshow on Debug Board"
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"
singledir-examples examples/mmio "mmio -- Memory mapped I/O example for ZTEX USB-FPGA Module 2.16"
singledir-examples examples/ucecho "ucecho -- Uppercase conversion example using the low speed interface of default firmware"
singledir fx2 "ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers"
singledir fx3 "ZTEX Firmware Kit for EZ-USB FX3 Microcontrollers"
singledir java/ztex "Java host software API of ZTEX SDK"
singledir java/FWLoader "Firmware / Bitstream loader for ZTEX USB-FPGA Modules"
singledir java/DeviceServer "DeviceServer for the ZTEX USB-FPGA Modules"