File: texi2html

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (75 lines) | stat: -rwxr-xr-x 1,828 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
#
# Copyright (c) 2008 Nokia Corporation.
# All rights reserved.
#
# Licensed under GPL version 2
#
# texi2html wrapper: Provides compatibily with a very old
# version of texi2html, which places all output files to
# the current directory. This used to be included in the
# old scratchbox 1 devkits, but now when they have updated
# it, many packages have been fixed and this is not so
# useful anymore.
#
# Enable the old texi2html functionality by setting
# SBOX_WRAPPER_TEXI2HTML_EMULATE_OLD_VERSION:
# Once enabled, this checks that the output file(s) will be placed to
# the current directory. Old version of texi2html did that by default,
# but newer versions create a subdirectory for the output files.
# Unfortunately many packages depend on the old way (because the old tool
# is the one that was used with scratchbox 1)
#
# Author: Lauri T. Aarnio

args="$*"
prog="$0"
progbase=`basename $0`

function error_not_inside_sb2()
{
	echo "SB2: $progbase: This wrapper can only be used from inside"
	echo "the scratchbox 2'ed environment"
	exit 1
}

if [ -z "$SBOX_SESSION_DIR" ]
then
	error_not_inside_sb2
fi

. $SBOX_SESSION_DIR/sb2-session.conf

real_tool=$sbox_tools/usr/bin/texi2html

if [ -z "$args" ]
then
	# No arguments
	exec $real_tool
fi

if [ -z "$SBOX_WRAPPER_TEXI2HTML_EMULATE_OLD_VERSION" ]
then
	# texi2html emulation has not been requested,
	# just go and do it..
	exec $real_tool $args
fi

# check options
for i in $args
do
	case "$i" in
	--output*)	# Output already assigned, don't change it
			exec $real_tool $args
			;;
	-monolithic)	# create a single file to current directory:
			# no need to modify output directory
			exec $real_tool $args
			;;
	esac
done

# No --output or -monolithic; use --output=. to force the output files
# to current directory
exec $real_tool --output=. $args