This file is indexed.

/usr/bin/mh_linkjars is in maven-repo-helper 1.8.12.

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
#!/bin/bash --

# Copyright 2011 Ludovic Claude.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

. /usr/share/maven-repo-helper/mh_lib.sh

syntax()
{
   echo -e "Usage: mh_linkjars [option]..."
   echo -e "Reads the file debian/\$package.poms and create links for each"
   echo -e "jar file generated by a POM listed in the .poms file."
   echo -e ""
   echo -e "Options:"
   echo -e "\t-h --help: show this text"
   echo -e "\t-V --version: show the version"
   echo -e "\t-p<package> --package=<package>: name of the Debian package which"
   echo -e "\t  will contain the jar files"
   echo -e "\t-e<version>, --set-version=<version>: set the version for the jars,"
   echo -e "\t  do not use the version declared in the POM file."
   echo -e "\t-r<rules> --rules=<rules>: path to the file containing the"
   echo -e "\t  rules to apply when cleaning the POM."
   echo -e "\t  Optional, the default location is debian/maven.rules"
   echo -e "\t-v --verbose: show more information while running"
   echo -e "\t-n --no-act: don't actually do anything, just print the results"
   echo -e ""
   echo -e "The <package>.poms file should contain the list of POM files associated with the"
   echo -e "list of jars to install in the repository, and each pom file should have either"
   echo -e "the option --usj-name, giving the name of the jar (without the extension)"
   echo -e "to link to and located in /usr/share/java, or the option --artifact, which should"
   echo -e "contain the full name of the source jar to link to."
   echo -e ""
   echo -e "See also: mh_linkjar(1), mh_install(1)"
   exit 1
}

ARGS="p package e set-version r rules v verbose n no-act skip-clean-poms" parseargs "$@"

SETVERSION=$(getarg e set-version)
RULES=$(getarg r rules)
PACKAGE=$(getarg p package)
VERBOSE=$(getarg v verbose)
NOACT=$(getarg n no-act)
SKIP_CLEAN_POMS=$(getarg skip-clean-poms)

function linkpackagejars()
{
  p=$1

  DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}"
  MH_ARGS="--package=${p} ${VERBOSE:+--verbose} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${SKIP_CLEAN_POMS:+--skip-clean-pom}"

  if [ -z "$NOACT" ]; then
    cat debian/$p.poms | while read POM OPT1 OPT2 OPT3 OPT4 OPT5 OPT6 OPT7 OPT8 OPT9 OPT10; do
      # Remove comments
      POM=${POM##\#*}
      if [[ -n "$POM" ]]; then
        POM_DIR=$(dirname $POM)
        ARTIFACT=
        C=1
        _opt=$(eval echo '$OPT'$C)
        while [ -n "$_opt" ]; do
          if [ "--usj-name" = "${_opt%%=*}" ]; then
            export ARTIFACT=/usr/share/java/${_opt##--usj-name=}.jar
            # Unset the option where we found the artifact
            eval OPT$C=
            # shift all following options
            while [ -n "$_opt" ]; do
              C1=$(( $C + 1 ))
              eval OPT$C='$OPT'$C1
              C=$C1
              _opt=$(eval echo '$OPT'$C)
            done
          elif [ "--artifact" = "${_opt%%=*}" ]; then
            export ARTIFACT=${_opt##--artifact=}
            # Unset the option where we found the artifact
            eval OPT$C=
            # shift all following options
            while [ -n "$_opt" ]; do
              C1=$(( $C + 1 ))
              eval OPT$C='$OPT'$C1
              C=$C1
              _opt=$(eval echo '$OPT'$C)
            done
          fi
          C=$(( $C + 1 ))
          _opt=$(eval echo '$OPT'$C)
        done
        if [[ ! "--ignore" == "$OPT1" ]]; then
          if [[ -n "$ARTIFACT" ]]; then
            if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then
              echo -e "\tmh_linkjar $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT"
            fi
            mh_linkjar $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT
          fi
        fi
      fi
    done
  fi
}

if [ -n "$PACKAGE" ]; then
  linkpackagejars $PACKAGE
else
  for p in `findpackages`; do
    if [ -f debian/$p.poms ]; then
      linkpackagejars $p
    fi
  done
fi