--- /dev/null
+#!/bin/bash
+# -----------------------------------------------------------------------
+# Author: Bill Erickson
+#
+set -euo pipefail
+BUILD_ID=''
+XUL_DIR=/openils/var/web/xul
+
+while getopts "b:" opt; do
+ case $opt in
+ b) BUILD_ID="$OPTARG"
+ esac
+done;
+
+[ -z "$BUILD_ID" ] && echo "-b <staff-client-build-ID> required!" && exit;
+[ "$(id -un)" != "opensrf" ] && echo "Run as opensrf!" && exit;
+
+
+
+# -----------------------------------------------------------------------
+# 1. Create persistent links to current staff client server directory
+# 2. Make staff client build directories available for easy download
+# from an Evergreen brick.
+# -----------------------------------------------------------------------
+function publish_staff_client_build {
+
+ cd /home/opensrf/Evergreen/
+ mkdir -p $XUL_DIR/builds/
+ cp -r Open-ILS/xul/staff_client/build $XUL_DIR/builds/
+ cd $XUL_DIR
+
+ # set up links to current server files
+
+ rm -f server
+ rm -f current
+ ln -s $BUILD_ID current
+ ln -s current/server server
+
+ # create current build bundle zip file
+
+ cd builds
+ rm -r build/server # server files are not needed by installed clients
+ rm -f current-client-build.zip
+ zip -rq $BUILD_ID.zip build
+ ln -s $BUILD_ID.zip current-client-build.zip
+ rm -r build # don't need the extracted version on the server
+}
+
+# copy custom files into place
+function copy_custom_files {
+ cd /home/opensrf/Evergreen/
+ # web templates
+ cp -r KCLS/openils/var/templates_kcls /openils/var/
+}
+
+publish_staff_client_build;
+copy_custom_files;
+++ /dev/null
-#!/bin/bash
-# -----------------------------------------------------------------------
-# Author: Bill Erickson
-#
-# 1. Make staff client build directories available for easy download
-# from an Evergreen brick.
-# 2. Create persistent links to current staff client server directory
-# -----------------------------------------------------------------------
-set -euo pipefail
-BUILD_ID=''
-XUL_DIR=/openils/var/web/xul
-
-while getopts "b:" opt; do
- case $opt in
- b) BUILD_ID="$OPTARG"
- esac
-done;
-
-[ -z "$BUILD_ID" ] && echo "-b <build ID> required!" && exit;
-[ "$(id -un)" != "opensrf" ] && echo "Run as opensrf!" && exit;
-
-cd /home/opensrf/Evergreen/
-mkdir -p $XUL_DIR/builds/
-cp -r Open-ILS/xul/staff_client/build $XUL_DIR/builds/
-cd $XUL_DIR
-
-# set up links to current server files
-
-rm -f server
-rm -f current
-ln -s $BUILD_ID current
-ln -s current/server server
-
-# create current build bundle zip file
-
-cd builds
-rm -r build/server # reduce file size; server files not needed by installed client
-rm -f current-client-build.zip
-zip -rq $BUILD_ID.zip build
-ln -s $BUILD_ID.zip current-client-build.zip
-rm -r build # don't need the extracted version on the server