s4

changeset 780:b23f26406690 feature-world

Migration logging and messages fixed
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 11 Jun 2020 19:37:59 +0900
parents 23be002abbaa
children 4dcfeeb59b8f
files s4-migrate.sh
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/s4-migrate.sh	Thu Jun 11 19:15:40 2020 +0900
     1.2 +++ b/s4-migrate.sh	Thu Jun 11 19:37:59 2020 +0900
     1.3 @@ -7,12 +7,16 @@
     1.4  dstdb=${dst%\|*}
     1.5  dsturl=${dst##*\|}
     1.6  type htmlescape >/dev/null 2>&1 || . `dirname $1`/s4-funcs.sh
     1.7 -world=${2##*-config-}; world=${world%.*}
     1.8 +case "$2" in
     1.9 +  s4-config.sh) world=Base ;;
    1.10 +  *)		world=${2##*-config-}; world=${world%.*} ;;
    1.11 +esac
    1.12  htmlworld=`echo "$world"|htmlescape`
    1.13  
    1.14 -echo srcdb=$srcdb dstdb=$dstdb
    1.15 -echo URL=$URL
    1.16 -echo dstURL=$dsturl
    1.17 +err "--- Migration Started at `date` ---"
    1.18 +err srcdb=$srcdb dstdb=$dstdb
    1.19 +err URL=$URL
    1.20 +err dstURL=$dsturl
    1.21  
    1.22  shift 2
    1.23  
    1.24 @@ -105,7 +109,7 @@
    1.25         )
    1.26    if [ -z "$d1$d2$d3" ]; then
    1.27      echo "Copying done, rewriting article links..."
    1.28 -    echo "Old URL: $UR"
    1.29 +    echo "Old URL: $URL"
    1.30      echo "New URL: $dsturl"
    1.31      query <<-EOF
    1.32  	UPDATE dst.article_s
    1.33 @@ -182,4 +186,5 @@
    1.34    fi
    1.35  done
    1.36  
    1.37 +err "Migration ended at `date` with failure=$failure"
    1.38  return $failure