X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=export.sh;h=0cff17bfe4d73ca520a6b54cfef2867ab25c3d63;hp=b0fdddf982d89e22cfd429cfd9c832462d274611;hb=b771aed5070864bbcbae286c8de74478f6837618;hpb=632cc690ac07130a51a947ee0f0b2bfae10b6595 diff --git a/export.sh b/export.sh index b0fdddf..0cff17b 100755 --- a/export.sh +++ b/export.sh @@ -3,6 +3,7 @@ # Export script # # Version: +# - 1.1.0: allow multiple targets # - 1.0.0: add a version comment cd "`dirname "$0"`" @@ -10,16 +11,19 @@ cd "`dirname "$0"`" if [ "$1" = "" ]; then echo "You need to specify where to export it" >&2 exit 1 -elif [ ! -d "$1/libs" ]; then - echo "The target export directory is not compatible" >&2 - exit 2 fi LIBNAME="`cat configure.sh | grep '^echo "NAME = ' | cut -d'"' -f2 | cut -d= -f2`" LIBNAME="`echo $LIBNAME`" make mrpropre -./configure.sh && make \ - && cp "$LIBNAME"-`cat VERSION`-sources.jar "$1"/libs/ \ - && cp "$LIBNAME".jar "$1"/libs/ +./configure.sh && make +if [ $? = 0 ]; then + while [ "$1" != "" ]; do + mkdir -p "$1"/libs/ + cp "$LIBNAME"-`cat VERSION`-sources.jar "$1"/libs/ + cp "$LIBNAME".jar "$1"/libs/ + shift + done +fi