archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / quicklisp / trunk / get-files.sh
blob6a1cee8f8786201c7ea66bfe7c3c37205a05d070
1 #!/usr/bin/env bash
2 set -eu
4 # SPDX-License-Identifier: GFDL-1.3-or-later
5 # utility script to download all required sources for inspection
7 FILES=(
8 'https://www.quicklisp.org/beta/index.html'
9 'https://www.quicklisp.org/beta/faq.html'
10 'https://beta.quicklisp.org/release-key.txt'
11 'https://beta.quicklisp.org/quicklisp.lisp'
12 'https://beta.quicklisp.org/quicklisp.lisp.asc'
15 # download files if they don't exist
16 for file in "${FILES[@]}"; do
17 if [ ! -f "$(basename ${file})" ]; then
18 curl --location --remote-name "$file"
20 done
22 if [ ! -f 'README.md' ]; then
23 html2text index.html >README.md
26 if [ ! -f 'FAQ.md' ]; then
27 html2text faq.html >FAQ.md
30 if [ ! -f 'LICENSE' ]; then
31 sed -n '/Copyright/,/from the author./p' README.md | sed -e 's/^ //' >LICENSE
34 # strip trailing whitespace from generated files
35 sed -e 's/[ \t]*$//' -i README.md FAQ.md LICENSE