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 wrap: on
line diff
--- a/s4-migrate.sh	Thu Jun 11 19:15:40 2020 +0900
+++ b/s4-migrate.sh	Thu Jun 11 19:37:59 2020 +0900
@@ -7,12 +7,16 @@
 dstdb=${dst%\|*}
 dsturl=${dst##*\|}
 type htmlescape >/dev/null 2>&1 || . `dirname $1`/s4-funcs.sh
-world=${2##*-config-}; world=${world%.*}
+case "$2" in
+  s4-config.sh) world=Base ;;
+  *)		world=${2##*-config-}; world=${world%.*} ;;
+esac
 htmlworld=`echo "$world"|htmlescape`
 
-echo srcdb=$srcdb dstdb=$dstdb
-echo URL=$URL
-echo dstURL=$dsturl
+err "--- Migration Started at `date` ---"
+err srcdb=$srcdb dstdb=$dstdb
+err URL=$URL
+err dstURL=$dsturl
 
 shift 2
 
@@ -105,7 +109,7 @@
        )
   if [ -z "$d1$d2$d3" ]; then
     echo "Copying done, rewriting article links..."
-    echo "Old URL: $UR"
+    echo "Old URL: $URL"
     echo "New URL: $dsturl"
     query <<-EOF
 	UPDATE dst.article_s
@@ -182,4 +186,5 @@
   fi
 done
 
+err "Migration ended at `date` with failure=$failure"
 return $failure

yatex.org