Diff for platos/_scripts/build-struct between version 1.11 and 1.12
| version 1.11, 2005/09/18 00:31:15 |
version 1.12, 2005/09/18 01:38:18 |
|
|
| # 30/01/2003 - created |
# 30/01/2003 - created |
| # |
# |
| |
|
| # $Platon: Platon.SK/office/_scripts/build-struct,v 1.10 2005/06/11 01:46:58 rajo Exp $ |
# $Platon: Platon.SK/office/_scripts/build-struct,v 1.11 2005/09/18 00:31:15 rajo Exp $ |
| |
|
| usage() |
usage() |
| { # {{{ |
{ # {{{ |
| echo "Usage:" |
echo "Usage:" |
| echo |
echo |
| echo "$0 '<PostScript|PDF|HTML>'" |
echo "$0 <PostScript|PDF|HTML|RTF> <LATEX|PDFLATEX|LATEX2HTML|LATEX2RTF> <command>" |
| echo |
echo |
| |
exit 1 |
| } # }}} |
} # }}} |
| |
|
| test_environ() |
test_environ() |
|
|
| ) |
) |
| } # }}} |
} # }}} |
| |
|
| if [ "$#" -lt "1" ]; then |
if [ "$#" -lt "3" ]; then |
| usage; |
usage; |
| fi |
fi |
| |
|
|
|
| OUTPUT \ |
OUTPUT \ |
| TOP_DIR |
TOP_DIR |
| |
|
| echo "Building $1" |
# tests for availability of required commands |
| |
# {{{ |
| |
if [ "X$2" = "X" ]; then |
| |
usage; |
| |
fi |
| |
if [ "X$3" = "X" ]; then |
| |
echo "Please, specify command $2= in your Makefile" |
| |
exit 1 |
| |
else |
| |
cmd="`which $3`"; |
| |
version="`$cmd -v 2>/dev/null | head -n 1`" |
| |
if [ "Bad$version" = "Bad" ]; then |
| |
echo "Command $3 returns bad version string, Building of $1 skipped ..." |
| |
exit 1; |
| |
fi |
| |
fi |
| |
# }}} |
| |
|
| |
echo "Building $1 with $cmd version $version" |
| |
# {{{ |
| if [ "X$1" = "XPostScript" ]; then |
if [ "X$1" = "XPostScript" ]; then |
| |
|
| test_environ ps__INPUT ps__OUTPUT |
test_environ ps__INPUT ps__OUTPUT |
|
|
| echo "I don't know, what do you want with parameter '$1'..." |
echo "I don't know, what do you want with parameter '$1'..." |
| exit 1 |
exit 1 |
| fi |
fi |
| |
#}}} |
| |
|
| # vim: fdm=marker fdl=0 fdc=3 |
# vim: fdm=marker fdl=0 fdc=3 |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|