net7 / talia

The Talia Digital Collection software

talia / talia.sh
100755 32 lines (28 sloc) 0.659 kb
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
#!/bin/sh
pd=`dirname "$0"`
prog_dir=`cd $pd && pwd`
jruby_dir="vendor/jruby-1.1.5"
# We start the shell that the user is currently running
shell=$SHELL
 
if test -z $SHELL ; then
    # Fall back to bash
    shell = '/bin/bash'
fi
 
export PATH=$prog_dir/$jruby_dir/bin:$prog_dir/$jruby_dir/lib/ruby/gems/1.8/bin:$PATH
export PATH=$prog_dir/lib/scripts:$PATH
export PATH=$prog_dir/vendor/plugins/talia_core/bin:$PATH
export PS1="talia-bash \w >> "
 
case $1 in
shell)
echo ;
echo "Opening JRuby environment for Talia (using $shell)..."
export TALIA_SHELL=true
$shell -i
;;
start)
jruby script/server
;;
*)
echo "Usage: $0 [start|shell]"
;;
esac