mirror of https://github.com/aamine/cbc
* 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:
parent
390af239ce
commit
b4d2e50529
|
@ -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
|
||||
|
|
31
install.sh
31
install.sh
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in New Issue