summaryrefslogtreecommitdiff
path: root/jh-mvn-install.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-14 21:33:45 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-14 21:33:45 -0400
commit969c6fea9f5f68f34bd268e5783dcb8267b13e03 (patch)
tree6a82bc9f87777696691676723fb2944bebe606ff /jh-mvn-install.sh
parent5a9295629b3a112113d3d7efd169e0af830c867b (diff)
jh-mvn-install: optionally create a symlink in /usr/share/javav0.4.1
Diffstat (limited to 'jh-mvn-install.sh')
-rw-r--r--jh-mvn-install.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/jh-mvn-install.sh b/jh-mvn-install.sh
index b135d8f..ab67594 100644
--- a/jh-mvn-install.sh
+++ b/jh-mvn-install.sh
@@ -4,7 +4,7 @@
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file for more details.
-if [[ $# != 5 ]]; then
+if [[ $# != 5 ]] && [[ $# != 6 ]]; then
jh-help $0 >>/dev/stderr
exit 1
fi
@@ -12,8 +12,15 @@ fi
base=`jh-mvn-basename $1 $2 $3`
jarfile=$4
pomfile=$5
+alias=$6
dir="${base%/*}"
install -d "${DESTDIR}${dir}"
install -m 644 "$jarfile" "${DESTDIR}${base}.jar"
install -m 644 "$pomfile" "${DESTDIR}${base}.pom"
+
+if [[ -n $alias ]]; then
+ link="/usr/share/java/$alias"
+ install -d "${DESTDIR}${link%/*}"
+ ln -s "${base}.jar" "${DESTDIR}${link}"
+fi