| 1 | #!/bin/sh |
| 2 | |
| 3 | # Export script |
| 4 | # |
| 5 | # Version: |
| 6 | # - 1.0.0: add a version comment |
| 7 | |
| 8 | cd "`dirname "$0"`" |
| 9 | |
| 10 | if [ "$1" = "" ]; then |
| 11 | echo "You need to specify where to export it" >&2 |
| 12 | exit 1 |
| 13 | elif [ ! -d "$1/libs" ]; then |
| 14 | echo "The target export directory is not compatible" >&2 |
| 15 | exit 2 |
| 16 | fi |
| 17 | |
| 18 | LIBNAME="`cat configure.sh | grep '^echo "NAME = ' | cut -d'"' -f2 | cut -d= -f2`" |
| 19 | LIBNAME="`echo $LIBNAME`" |
| 20 | |
| 21 | make mrpropre |
| 22 | ./configure.sh && make \ |
| 23 | && cp "$LIBNAME"-`cat VERSION`-sources.jar "$1"/libs/ \ |
| 24 | && cp "$LIBNAME".jar "$1"/libs/ |
| 25 | |