forked from tmm1/matzruby
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuildUtils
executable file
·34 lines (33 loc) · 927 Bytes
/
buildUtils
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#Build and optionally install the extra ruby utilities MBARI needs for ESP
#parameters are passed on to make
#to force complete rebuild: buildUtils clean all
#to install for an arm host, force our ruby to load a different rbconfig.rb:
# RUBYLIB=~/armHost/usr/local/lib/ruby/1.6/arm-linux buildUtils clean install
toolDirs='mbarilib termios'
defdir=`dirname $0`
case $defdir in
/*) ;;
*) defdir=$PWD/$defdir ;;
esac
: ${RUBY:="$defdir/miniruby -I$defdir -I$defdir/lib"}
for d in $toolDirs; do
cd $d && {
for mktarget; do
[ "$mktarget" = clean ] && {
echo "Making $d:"
$RUBY extconf.rb || exit $?
}
done
make "$@" || exit 1
cd ..
}
done
for mktarget; do #for things that don't have an explicit "build" operation
[ "$mktarget" = install ] && {
echo "Installing MBARI core Ruby libraries..."
$RUBY inst-mbari.rb $DESTDIR || exit 32
break
}
done
: