Skip to content
Snippets Groups Projects
Commit 655b354a authored by James Vasile's avatar James Vasile
Browse files

Add downloader for KDE agreement

KDE presents this as a series of png files on their site, which is less
convenient that assembling that into a PDF.  But we don't have
permission to distribute an assembled PDF, so instead we have a script
that lets a user take the png files and make their own PDF.
parent 01a79b37
No related branches found
No related tags found
No related merge requests found
bin/dosh 0 → 100755
#!/usr/bin/env bash
SCRIPTNAME=dosh
BASEDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/..
# Call the upstream dosh
watch(){ ${OTS_DOCTOOLS_DIR}/dosh ${FUNCNAME[0]}; }
_dload(){
if [ -f "$2" ]; then
return
fi
wget -O $2 $1
}
docs_kde() {
mkdir -p $BASEDIR/doc/kde/.cache
cd $BASEDIR/doc/kde/.cache
# Don't download if it already exists
if [ -f ../kdefreeqt.pdf ]; then
return
fi
_dload https://kde.org/community/whatiskde/images/kdefreeqt0.png kdefreeqt0.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt1.png kdefreeqt1.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt2.png kdefreeqt2.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt3.png kdefreeqt3.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt4.png kdefreeqt4.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt5.png kdefreeqt5.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt6.png kdefreeqt6.png
_dload https://kde.org/community/whatiskde/images/kdefreeqt7.png kdefreeqt7.png
convert kdefreeqt*.png ../kdefreeqt.pdf
}
docs() {
docs_kde
}
"$@" # <- execute the task
[ "$#" -gt 0 ] || printf "Usage:\n\t./${SCRIPTNAME} %s\n" "($(compgen -A function | grep '^[^_]' | paste -sd '|' -))"
all:
@../bin/dosh docs
clean-cache:
@echo rm -rf kde/.cache
clean: clean-cache
rm -rf kde/kdefreeqt.pdf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment