3 # byhand-debian-faq - automatic BYHAND handling for debian-faq
5 # This file is part of dak.
7 # Copyright 2013, Ansgar Burchardt <ansgar@debian.org>
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along
20 # with this program; if not, write to the Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
29 scriptname=byhand-debian-faq
32 echo "usage: ${scriptname} <byhand-file> <version> <arch> <changes-file>" >&2
37 byhand_file="${byhand_path##*/}"
42 suite="$(awk '/^Distribution:/ { print $2 }' < "${changes}")"
48 echo "$0: not targeted at unstable" >&2
53 if [[ ! "${byhand_file}" =~ ^debian-faq\.en\.(html\.tar|txt|ps|pdf)\.gz$ ]]; then
54 echo "$0: unknown file '${byhand_file}'" >&2
58 target="${ftpdir}/doc/FAQ/"
59 if [ ! -d "${target}" ]; then
63 cp --remove-destination "${byhand_path}" "${target}"
64 chmod 0644 "${target}/${byhand_file}"