X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2Finstaller;h=7049554ead115672db171b03e7dfa030731b8019;hb=634be141f3f014e31d5931a968c0c0f7e07205fb;hp=be4a2bbd5e5d8c24591ae60c1bc02968e8cb5465;hpb=4c5d48354c38f5e8b36f9413d705d03b4c31aaf5;p=libucw.git diff --git a/build/installer b/build/installer index be4a2bbd..7049554e 100755 --- a/build/installer +++ b/build/installer @@ -5,28 +5,34 @@ echo "Installing to $DEST" for d in "" cf $SH_EXTRA_RUNDIRS ; do if [ ! -d $DEST/$d ] ; then echo "Creating $DEST/$d" - mkdir $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/ +for d in $SH_INSTALL_RUNDIRS ; do + echo "Installing to $DEST/$d" + rm -rf $DEST/$d + mkdir -p $DEST/$d + cp -pPRL run/$d/* $DEST/$d/ +done echo "Installing config files..." 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 ] ; then echo "cf/$a: will be regenerated automatically" elif diff -u $DEST/cf/$a run/cf/$a ; then echo "cf/$a: no differences" else echo -n "cf/$a differs, replace it [Yn]? " - read x - if [ -z "$x" -o "$x" == "y" -o "$x" == "Y" ] ; then + if [ -z "$SH_AUTO_CONFIRM" ] ; then + read x + else + x="$SH_AUTO_CONFIRM" + echo "$x" + fi + if [ -z "$x" -o "$x" = "y" -o "$x" = "Y" ] ; then echo "cf/$a: replacing and keeping the old version as cf/$a.old" mv $DEST/cf/$a $DEST/cf/$a.old cp run/cf/$a $DEST/cf/$a