* install.sh: check if jar and libcbc are built.

* install.sh: fix syntax error.


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4035 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-09-15 18:53:09 +00:00
parent 390af239ce
commit b4d2e50529
2 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,9 @@
Tue Sep 16 03:53:07 2008 Minero Aoki <aamine@loveruby.net>
* install.sh: check if jar and libcbc are built.
* install.sh: fix syntax error.
Tue Sep 16 03:42:43 2008 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/compiler/TypeChecker.java: reject statements

View File

@ -1,9 +1,26 @@
#!/bin/bash
version=1.0.0
prefix="${1:-/usr/local/cbc/$version}"
prefix="${1:-/usr/local/cbc}"
BINS="bin/cbc"
LIBS="lib/cbc.jar lib/libcbc.a"
invoke() {
main()
{
if ! [ -f lib/cbc.jar && -f lib/libcbc.a ]
then
echo "lib/cbc.jar and lib/libcbc.a do not exist. Build it first" 1>&2
exit 1
fi
echo "prefix=$prefix"
invoke mkdir -p "$prefix/bin"
invoke cp $BINS "$prefix/bin"
invoke mkdir -p "$prefix/lib"
invoke cp $LIBS "$prefix/lib"
echo "cbc successfully installed as $prefix/bin/cbc"
}
invoke()
{
echo "$@"
if ! "$@"
then
@ -12,10 +29,4 @@ invoke() {
fi
}
echo "version=$version"
echo "prefix=$prefix"
invoke mkdir -p "$prefix/bin"
invoke cp bin/cbc "$prefix/bin
invoke mkdir -p "$prefix/lib"
invoke cp cbc.jar lib/libcbc.o "$prefix/lib"
echo "cbc successfully installed as $prefix/bin/cbc"
main "$@"