#!/bin/sh
set -e
DEST=`eval echo $1`
-shift
echo "Installing to $DEST"
-if [ ! -d $DEST/cf ] ; then
- echo "Creating $DEST and the whole directory hierarchy under it."
- mkdir -p $DEST/{cf,db,index,log,tmp}
-fi
+for d in "" cf $SH_EXTRA_RUNDIRS ; do
+ if [ ! -d $DEST/$d ] ; then
+ echo "Creating $DEST/$d"
+ mkdir -p $DEST/$d
+ fi
+done
echo "Installing binaries..."
rm -rf $DEST/{bin,lib}
mkdir -p $DEST/{bin,lib}
cp -aL run/bin/* $DEST/bin/
cp -aL run/lib/* $DEST/lib/
echo "Installing config files..."
-for a in "$@" ; do
+for a in $SH_CONFIGS ; do
if [ -f run/cf/$a ] ; then
if [ ! -f $DEST/cf/$a ] ; then
echo "cf/$a: new, installed"
cp run/cf/$a $DEST/cf/$a
- elif [ $a == catalog-rules ] ; then
+ elif [ $a == catalog-rules -o $a == url-equiv ] ; then
echo "cf/$a: will be regenerated automatically"
elif diff -u $DEST/cf/$a run/cf/$a ; then
echo "cf/$a: no differences"