Mercurial > mxe-octave
annotate tools/create-screenshot-for-doc @ 5531:eae508c12529
Add build rule for build-octave (bug #49503).
* src/build-octave.mk: Add new build rule for build-octave which can be used for
cross-building binary packages that depend on Octave as a build tool.
* dist-files.mk: Add new file to list.
* index.html: Add new package to list.
* src/of-communications.mk, src/of-image.mk, src/of-mapping.mk,
src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk,
src/of-windows.mk: Add optional dependency on build-octave.
* configure.ac: Add new configure switch "--disable-system-octave" that is
needed to build the build-octave package.
* Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the
default build tools and build it only if a package explicitly depends on it.
Display warning about missing native Octave version only if necessary.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 08 Sep 2020 23:04:38 +0200 |
parents | 14b3f5ea78ae |
children |
rev | line source |
---|---|
2358
14b3f5ea78ae
Cleanup coding style via "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2176
diff
changeset
|
1 #!/usr/bin/env bash |
2176
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 set -eu |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 if [ "$#" -ne 2 ]; then |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 echo |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 echo "Syntax: $0 [IMAGE.png] [NAME]" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 echo |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 echo 'IMAGE.png -> screenshot-NAME.png + screenshot-NAME-small.png' |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 echo |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 exit 1 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 fi |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 set -v |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 IMAGE_FILE="$1" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 NAME="$2" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 cat "$IMAGE_FILE" \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 | pngtopnm \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 | pnmtopng -compression 9 \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 > "screenshot-$NAME.png" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
23 cat "screenshot-$NAME.png" \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
24 | pngtopnm \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
25 | pnmscale -ysize 128 \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
26 > "screenshot-$NAME-small.pnm" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
27 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
28 pnmquant 256 "screenshot-$NAME-small.pnm" \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
29 | pnmtopng -compression 9 \ |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
30 > "screenshot-$NAME-small.png" |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
31 |
4e68de2de908
Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
32 rm -f "screenshot-$NAME-small.pnm" |