This file is indexed.

/usr/bin/update-yorickdoc is in yorick-doc 2.2.04+dfsg1-5.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/sh
# $Id: update-yorickdoc,v 1.5 2009/12/02 16:01:03 paumard Exp $

set -e

# First set "builtin" defaults, see conffile for details:
CONFFILE=/etc/yorick-doc
USERFILE=${HOME}/.`basename ${CONFFILE}`
ENABLE_AUTO=1
SRC_DIR=/usr/share/yorick-doc
TEMPLATE=${SRC_DIR}/template.html
FROM=/usr/share/yorick/i:/usr/share/yorick/i0
TO=/usr/share/doc/yorick-doc
XREF_DIR=html_xref
QUIET=1

# source CONFFILE to possibly override these defaults:
if [ -r $CONFFILE ]; then
    . $CONFFILE
fi
if [ `id -u` -gt 0 -a -r $USERFILE ]; then
    . $USERFILE
fi

usage() {
    echo Usage: `basename $0` '[--auto|-a] [--purge|-p] [--verbose|-v|--quiet|-q] \'
    echo '   [--src-dir=] [--from=] [--to=] [--template=] [--xref-dir=] [--conf=]'
}

# parse command-line
PURGE=0
for opt; do
    case $opt in
	--auto|-a)
	    if [ $ENABLE_AUTO -eq 0 ]; then
		echo "ENABLE_AUTO set to zero in $CONFFILE or equivalent"
		echo "Not updating Yorick documentation"
		exit 0
	    fi
            if type dpkg-trigger >/dev/null 2>&1 ; then
                exit 0
            fi
	    ;;
	--auto-now|-A)
	    if [ $ENABLE_AUTO -eq 0 ]; then
		echo "ENABLE_AUTO set to zero in $CONFFILE or equivalent"
		echo "Not updating Yorick documentation"
		exit 0
	    fi
	    ;;
	--purge|-p)
	    PURGE=1
	    ;;
	--verbose|-v)
	    QUIET=0
	    ;;
	--quiet|-q)
	    QUIET=1
	    ;;
	--src-dir=*)
	    SRC_DIR=${opt#--*=}
	    ;;
	--from=*)
	    FROM=${opt#--*=}
	    ;;
	--to=*)
	    TO=${opt#--*=}
	    ;;
	--template=*)
	    TEMPLATE=${opt#--*=}
	    ;;
	--xref-dir=*) 
	    XREF_DIR=${opt#--*=}
	    ;;
	--conf=*) 
	    CUSTOMRC=${opt#--*=}
	    if [ -r $CUSTOMRC ]; then
		. $CUSTOMRC
	    else
		echo "Warning: $CUSTOMRC not found"
	    fi
	    ;;
	*)
	    echo Unknown parameter $opt
	    usage
	    exit 1
	    ;;
    esac
done

if [ $QUIET -eq 1 ]; then
    QUIET=--quiet
else
    QUIET=
fi

# Do the actual work
echo Updating Yorick documentation in ${TO}/${XREF_DIR}
if [ -e ${TO}/${XREF_DIR} ]; then
    rm -Rf ${TO}/${XREF_DIR}
fi

if [ $PURGE -eq 1 ]; then
    echo "${TO}/${XREF_DIR} deleted."
    exit 0
fi

if [ -x "`which yorick`" ]; then
    mkdir -p $TO
    PACKINFO=`mktemp`
    KEYWORDS=`mktemp`
    ALIASES=`mktemp`

    cat ${SRC_DIR}/*.packinfo >> $PACKINFO
    cat ${SRC_DIR}/*.keywords | sort | uniq >> $KEYWORDS
    cat ${SRC_DIR}/*.aliases >> $ALIASES

    yorick -batch htmldoc.i --template=$TEMPLATE --packinfo=$PACKINFO \
	--keywords=$KEYWORDS --aliases=$ALIASES --from=$FROM --to=$TO \
	--xref-dir=$XREF_DIR $QUIET

    rm -f $PACKINFO $KEYWORDS $ALIASES
else
    echo "Yorick not found; ${TO}/${XREF_DIR} deleted."
fi

exit 0