summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/oauth/oauth-conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth-conf15
1 files changed, 11 insertions, 4 deletions
diff --git a/sca-cpp/trunk/modules/oauth/oauth-conf b/sca-cpp/trunk/modules/oauth/oauth-conf
index dc3a6ebc9d..02f81a240b 100755
--- a/sca-cpp/trunk/modules/oauth/oauth-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth-conf
@@ -18,9 +18,16 @@
# under the License.
# Generate an OAuth server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
@@ -29,8 +36,8 @@ host=`echo $conf | awk '{ print $6 }'`
cat >>$root/conf/modules.conf <<EOF
# Generated by: oauth-conf $*
# Load support for OAuth authentication
-LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1.so
-LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2.so
+LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1$libsuffix
+LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2$libsuffix
EOF