summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script')
-rw-r--r--source4/script/installjsonrpc.sh32
-rw-r--r--source4/script/installswat.sh11
2 files changed, 32 insertions, 11 deletions
diff --git a/source4/script/installjsonrpc.sh b/source4/script/installjsonrpc.sh
new file mode 100644
index 0000000000..b91f6bf3bb
--- /dev/null
+++ b/source4/script/installjsonrpc.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+SERVICESDIR=$1
+SRCDIR=$2
+
+echo Installing JSON-RPC services in $SERVICESDIR
+
+cd $SRCDIR/../services || exit 1
+
+mkdir -p $SERVICESDIR || exit 1
+
+installdir() {
+ for f in $*; do
+ dname=`dirname $f`
+ echo "Installing $f in $dname"
+ test -d $SERVICESDIR/$dname || mkdir -p $SERVICESDIR/$dname || exit 1
+ cp $f $SERVICESDIR/$dname/ || exit 1
+ chmod 0644 $SERVICESDIR/$f || exit 1
+ done
+}
+
+installdir `find . -name '*.esp'`
+
+cat << EOF
+======================================================================
+The JSON-RPC services have been installed.
+======================================================================
+EOF
+
+
+exit 0
+
diff --git a/source4/script/installswat.sh b/source4/script/installswat.sh
index 72dfc2f456..549c11da35 100644
--- a/source4/script/installswat.sh
+++ b/source4/script/installswat.sh
@@ -34,16 +34,5 @@ The swat files have been installed.
======================================================================
EOF
-cd $SRCDIR/.. || exit 1
-
-installdir `find services -name '*.esp'`
-
-cat << EOF
-======================================================================
-The JSON-RPC services have been installed.
-======================================================================
-EOF
-
-
exit 0