X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=build%2Finstaller;h=39e62e61be2d068d632482b9fb765f8eccf2ced1;hb=df17c554147ac4d68ead793d60ca1f8208bd2e6f;hp=960e4032ec2f99de0b14dabe8ebcbeb9c59f1654;hpb=d1d23d2a71a69d20c9a390262bc1060af0acf05f;p=libucw.git diff --git a/build/installer b/build/installer index 960e4032..39e62e61 100755 --- a/build/installer +++ b/build/installer @@ -8,7 +8,7 @@ for d in "" cf $SH_EXTRA_RUNDIRS ; do mkdir -p $DEST/$d fi done -for d in `echo $SH_INSTALL_RUNDIRS | sed 's/ */\n/g' | sort -u` ; do +for d in $SH_INSTALL_RUNDIRS ; do echo "Installing to $DEST/$d" rm -rf $DEST/$d mkdir -p $DEST/$d @@ -20,14 +20,19 @@ for a in $SH_CONFIGS ; do 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