File: configure

package info (click to toggle)
lua-rings 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 184 kB
  • ctags: 58
  • sloc: ansic: 261; makefile: 26; sh: 20
file content (27 lines) | stat: -rwxr-xr-x 536 bytes parent folder | download | duplicates (13)
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
#!/bin/sh

if [ -f config.orig ]; then
  mv config.orig config
fi

echo "Trying to where you installed Lua..."

if which lua; then
  lua_bin=`which lua`
  lua_bin_dir=`dirname $lua_bin`
else
  lua_bin=`which lua51`
  lua_bin_dir=`dirname $lua_bin`
fi

lua_root=`dirname $lua_bin_dir`

if [ $lua_root != "" ]; then
  echo "Lua is in $lua_root"
  echo "Changing config"
  sed -i.orig -e "s|/usr/local|$lua_root|" config
  echo "Now run 'make' and 'make install'"
else
  echo "Lua not found, please install Lua (and put in your PATH)"
fi