diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-31 21:52:24 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-11-01 19:58:08 +0100 |
commit | 1480338c5a3da5b6494565ab955ab67a15f19dd3 (patch) | |
tree | df68073fad776481251093fd60a901fa7c905bec /tmp/0001-o-Supporting-platforms-where-xmlstarlet-is-installed.patch | |
parent | 40eaf2303f013321b923c5bb616f0579a01a9884 (diff) | |
download | app.sh-1480338c5a3da5b6494565ab955ab67a15f19dd3.tar.gz app.sh-1480338c5a3da5b6494565ab955ab67a15f19dd3.tar.bz2 app.sh-1480338c5a3da5b6494565ab955ab67a15f19dd3.tar.xz app.sh-1480338c5a3da5b6494565ab955ab67a15f19dd3.zip |
app-init: Adding '-s' option to set a configuration option before the
resolver is executed and app is installed. The configuration will be
available when the app's hooks are executed.
o Running the documentation though aspell.
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 + |