5 echo "Installing to $DEST"
6 if [ ! -d $DEST/cf ] ; then
7 echo "Creating $DEST and the whole directory hierarchy under it."
8 mkdir -p $DEST/{cf,db,index,log,tmp}
10 echo "Installing binaries..."
11 rm -rf $DEST/{bin,lib}
12 mkdir -p $DEST/{bin,lib}
13 cp -aL run/bin/* $DEST/bin/
14 cp -aL run/lib/* $DEST/lib/
15 echo "Installing config files..."
17 if [ -f run/cf/$a ] ; then
18 if [ ! -f $DEST/cf/$a ] ; then
19 echo "cf/$a: new, installed"
20 cp run/cf/$a $DEST/cf/$a
21 elif [ $a == catalog-rules ] ; then
22 echo "cf/$a: will be regenerated automatically"
23 elif diff -u $DEST/cf/$a run/cf/$a ; then
24 echo "cf/$a: no differences"
26 echo -n "cf/$a differs, replace it [Yn]? "
28 if [ -z "$x" -o "$x" == "y" -o "$x" == "Y" ] ; then
29 echo "cf/$a: replacing and keeping the old version as cf/$a.old"
30 mv $DEST/cf/$a $DEST/cf/$a.old
31 cp run/cf/$a $DEST/cf/$a
33 echo "cf/$a: installing the new version as cf/$a.dist"
34 cp run/cf/$a $DEST/cf/$a.dist