forked from SpiNNakerManchester/SupportScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrat.sh
More file actions
executable file
·26 lines (26 loc) · 697 Bytes
/
rat.sh
File metadata and controls
executable file
·26 lines (26 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
dir0=$(dirname $BASH_SOURCE)
op="$1"
shift
ratver=0.13
raturl="http://www.mirrorservice.org/sites/ftp.apache.org/creadur/apache-rat-${ratver}/apache-rat-${ratver}-bin.tar.gz"
ant=${ANT-ant}
case $op in
download)
if curl -I -D - "$raturl" 2>/dev/null | grep -q 'application/x-gzip'; then
curl --output - "$raturl" | (cd $dir0 && tar -zxf -)
else
echo "Version of RAT ($ratver) is wrong?"
echo "RAT URL: $raturl"
fi
;;
run)
# java -jar "${dir0}/apache-rat-${ratver}/apache-rat-${ratver}.jar" ${1+"$@"}
eval $ant "-e -q -f $dir0/rat.xml -lib $dir0/apache-rat-$ratver rat"
;;
*)
echo "unknown op \"$op\": must be download or run" >&2
exit 1
;;
esac
exit $?