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