summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 13 insertions, 8 deletions
diff --git a/configure b/configure
index 0bcd79b..90f4fe6 100755
--- a/configure
+++ b/configure
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
name='configure' # rvs configureation script
# version 0.7.0
# Copyright (C) 2009 Luke Shumaker
@@ -9,13 +9,15 @@ name='configure' # rvs configureation script
#
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
- _srcdir=$(readlink -f `dirname "$0"`)
+ _name='rvs'
+ _RVS='$(bindir)/$(rvs)'
_SHELL='/bin/sh'
_prefix='/usr/local'
_exec_prefix='$(prefix)'
_bindir='$(exec_prefix)/bin'
_sbindir='$(exec_prefix)/sbin'
- _rvsdir='/etc'
+ _libexecdir='$(exec_prefix)/libexec'
+ _srcdir=$(readlink -f `dirname "$0"`)
vars='srcdir SHELL prefix exec_prefix bindir sbindir rvsdir'
@@ -58,8 +60,12 @@ for var in $vars; do
var1="_$var"
val=${!var1}
- var=${var//':'/'\:'}
- val=${val//':'/'\:'}
+ # GNU bash optimized version
+ var=${var//':'/'\:'}
+ val=${val//':'/'\:'}
+ # POSIX version
+ #var=`echo "$var" | sed 's@:@\\:@g'`
+ #val=`echo "$val" | sed 's@:@\\:@g'`
echo "s:@$var@:$val:g" >> var.sed
done
@@ -71,11 +77,10 @@ Makefiles=`find "${_srcdir}/" -regextype posix-extended \
-regex '(.*/)?Makefile\.in' -type f`
for orig in $Makefiles; do
- new=${orig/%.orig/}
+ new=${orig/%.in/}
new=${new/#$_srcdir\//}
mkdir -p `dirname "$new"`
sed -f var.sed < "${orig}" > "${new}"
done
-#rm var.sed
-
+rm var.sed