diff options
Diffstat (limited to 'tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch')
-rw-r--r-- | tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch b/tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch new file mode 100644 index 0000000..dc82a70 --- /dev/null +++ b/tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch @@ -0,0 +1,62 @@ +From ed52962997364560d341e0197c20a616e9b0f03e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Trygve=20Laugst=C3=B8l?= <trygvis@inamo.no> +Date: Wed, 30 Oct 2013 14:29:06 +0100 +Subject: [PATCH 1/5] o Supporting platforms where 'xmlstarlet' is installed as + 'xml' (At least Suse does that). + +--- + libexec/app-resolver-maven | 38 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + +diff --git a/libexec/app-resolver-maven b/libexec/app-resolver-maven +index 419adcc..ec1ad6b 100755 +--- a/libexec/app-resolver-maven ++++ b/libexec/app-resolver-maven +@@ -81,6 +81,44 @@ download_artifact() { + fi + } + ++ ++which() { ++ /usr/bin/which "$1" 2>/dev/null ++} ++ ++# Wrapper to cache the lookup of the xmlstarlet command. ++# Remember that xmlstarlet on at least SLES requires single quotes ++# instead of double quotes when building the selector, e.g.: ++# use [text()='zip'] instead of [text()="zip"]. ++ ++_xmlstarlet="" ++xmlstarlet() { ++ if [ ! -z "$_xmlstarlet" ] ++ then ++ "$_xmlstarlet" "$@" ++ return ++ fi ++ ++ _xmlstarlet="`which xmlstarlet`" ++ ++ if [ ! -z "$_xmlstarlet" ] ++ then ++ "$_xmlstarlet" "$@" ++ return ++ fi ++ ++ _xmlstarlet="`which xml`" ++ ++ if [ ! -z "$_xmlstarlet" ] ++ then ++ "$_xmlstarlet" "$@" ++ return ++ fi ++ ++ echo "Could not find xmlstarlet." >&2 ++ exit 1 ++} ++ + resolve_version() { + local group_id=`app-conf get maven.group_id` + local artifact_id=`app-conf get maven.artifact_id` +-- +1.8.4.rc3 + |