summaryrefslogtreecommitdiff
path: root/jh-mvn-install.sh
blob: c33e097952eac1b8305ac8077e3f9f8e048896b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Copyright © 2013 Luke Shumaker <lukeshu@sbcglobal.net>
# This work is free. You can redistribute it and/or modify it under the
# 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
	jh-help $0 >>/dev/stderr
	exit 1
fi

base="`$jh_cmd mvn-basename $1 $2 $3`"
jarfile=$4
pomfile=$5

dir="${base%/*}"
install -d "${DESTDIR}${dir}"
install -m 644 "$jarfile" "${DESTDIR}${base}.jar"
install -m 644 "$pomfile" "${DESTDIR}${base}.pom"