| 1 | #!/bin/sh |
| 2 | |
| 3 | # Export script |
| 4 | # |
| 5 | # Version: |
| 6 | # - 1.1.0: allow multiple targets |
| 7 | # - 1.0.0: add a version comment |
| 8 | |
| 9 | cd "`dirname "$0"`" |
| 10 | |
| 11 | if [ "$1" = "" ]; then |
| 12 | echo "You need to specify where to export it" >&2 |
| 13 | exit 1 |
| 14 | fi |
| 15 | |
| 16 | LIBNAME="`cat configure.sh | grep '^echo "NAME = ' | cut -d'"' -f2 | cut -d= -f2`" |
| 17 | LIBNAME="`echo $LIBNAME`" |
| 18 | |
| 19 | make mrpropre |
| 20 | ./configure.sh && make |
| 21 | if [ $? = 0 ]; then |
| 22 | while [ "$1" != "" ]; do |
| 23 | mkdir -p "$1"/libs/ |
| 24 | cp "$LIBNAME"-`cat VERSION`-sources.jar "$1"/libs/ |
| 25 | cp "$LIBNAME".jar "$1"/libs/ |
| 26 | shift |
| 27 | done |
| 28 | fi |
| 29 | |