Debian Codegraph @

bin/mh_lspoms

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`. --
2
3 MH_VERSION=$(lsscip-shell system . . ls. /usr/share/maven-repo/org/debian/maven/maven-packager-utils/scip-shell filesystem . . `/usr/share/maven-repo/org/debian/maven/maven-packager-utils/`. | sedscip-shell system . . sed. 's|/||')
4 . /usr/share/maven-repo-helper/mh_lib.shscip-shell source . . `/usr/share/maven-repo-helper/mh_lib.sh`.
5
6 syntaxscip-shell shell shell-project 0.0.0 syntax().()
7 {
8 echoscip-shell system . . echo. -e "Usage: mh_lspoms [option]... <package>"
9 echoscip-shell system . . echo. -e "Looks for all POM files defined in the source of the project."
10 echoscip-shell system . . echo. -e ""
11 echoscip-shell system . . echo. -e "Where"
12 echoscip-shell system . . echo. -e "\t<package> is the name of the binary package,"
13 echoscip-shell system . . echo. -e "\t e.g. libcommons-lang-java. Default to the first binary"
14 echoscip-shell system . . echo. -e "\t found in the debian/control file"
15 echoscip-shell system . . echo. -e "Options:"
16 echoscip-shell system . . echo. -e "\t-h --help: show this text"
17 echoscip-shell system . . echo. -e "\t-V --version: show the version"
18 echoscip-shell system . . echo. -e "\t-p<package> --package=<package>: package to act on"
19 echoscip-shell system . . echo. -e "\t-f --force: force run even if the .poms files exist."
20 echoscip-shell system . . echo. -e "\t Only maven.rules will be created, assuming that it"
21 echoscip-shell system . . echo. -e "\t did not exist before."
22 echoscip-shell system . . echo. -e "\t-n --non-interactive: non interactive session, don't ask questions."
23 echoscip-shell system . . echo. -e "\t-o --offline: don't ever connect to the internet, for Debian build"
24 echoscip-shell system . . echo. -e "\t compatibility."
25 echoscip-shell system . . echo. -e ""
26 echoscip-shell system . . echo. -e "You need to execute it on the unpacked origial source tree, merged with the"
27 echoscip-shell system . . echo. -e "debian/ folder. It will create the file debian/<binary package>.poms which"
28 echoscip-shell system . . echo. -e "contains all the POMs to deploy to the Maven repository and is used by"
29 echoscip-shell system . . echo. -e "mh_installpoms."
30 echoscip-shell system . . echo. -e ""
31 echoscip-shell system . . echo. -e "The contents of debian/<binary package>.poms should be:"
32 echoscip-shell system . . echo. -e "\t* one POM file location per line,"
33 echoscip-shell system . . echo. -e "\t* optionally, the location is followed by the option --no-parent"
34 echoscip-shell system . . echo. -e "\t to indicate that if this POM inherits from a parent, the parent"
35 echoscip-shell system . . echo. -e "\t element will be removed."
36 exit 1
37 }
38
39 ARGS="p package f force n non-interactive o offline" parseargs "$@"
40
41 PACKAGE=$(getarg p package)
42 FORCE=$(getarg f force)
43 NON_INTERACTIVE=$(getarg n non-interactive)
44 OFFLINE=$(getarg o offline)
45
46 if [scip-shell system . . `[`. -z "$PACKAGE" ]; then
47 if [scip-shell system . . `[`. "$ARGC" -gt "0" ]; then
48 PACKAGE="${ARGV[0]}"
49 else
50 PACKAGE=$(dh_listpackagesscip-shell system . . dh_listpackages. | headscip-shell system . . head. -1)
51 fi
52 fi
53
54 if [scip-shell system . . `[`. -e debian/$PACKAGE.poms -a -z "$FORCE" ]; then
55 echoscip-shell system . . echo. "debian/$PACKAGE.poms already exist. Please delete it if you want to regenerate it."
56 else
57 mkdirscip-shell system . . mkdir. -p debian
58 javascip-shell system . . java. -cp /usr/share/java/maven-project.jar:/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jarscip-shell filesystem . . `/usr/share/java/maven-project.jar:/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jar`. org.debian.maven.packager.DependenciesSolver ${NON_INTERACTIVE:+--non-interactive} ${OFFLINE:+--offline} --package=$PACKAGE --maven-repo=/usr/share/maven-repo
59 rmscip-shell system . . rm. debian/$PACKAGE.substvars
60 echoscip-shell system . . echo. "The list of POM files is now in debian/$PACKAGE.poms"
61 fi
62