annotate bin/qpdf @ 133:660dc255542a

parameterise the temp file and move it to /dev/shm
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 14 Jul 2021 16:49:35 +0000
parents 551ff1de13d8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
118
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 #!/usr/bin/bash
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 G=/lustre/home/dc007/hst/gentoo
133
660dc255542a parameterise the temp file and move it to /dev/shm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 118
diff changeset
3 TF=/dev/shm/hst/xxx.pdf
118
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 if [ "${!#}" = "-" ]
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 then
133
660dc255542a parameterise the temp file and move it to /dev/shm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 118
diff changeset
6 cat > $TF
660dc255542a parameterise the temp file and move it to /dev/shm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 118
diff changeset
7 LD_LIBRARY_PATH=$G/usr/lib $G/usr/bin/qpdf "${@:1:${#}-1}" $TF
118
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 else
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 LD_LIBRARY_PATH=$G/usr/lib $G/usr/bin/qpdf "$@"
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10 fi
551ff1de13d8 qpdf needs LD_LIB_PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11