diff s4-world.sh @ 797:56adb6e5ee68 feature-world

Add world-links to Grps entry of topmenu
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 14 Jun 2020 11:15:45 +0900
parents 8646ec4bd6fc
children ba11fd987baf
line wrap: on
line diff
--- a/s4-world.sh	Sun Jun 14 10:14:12 2020 +0900
+++ b/s4-world.sh	Sun Jun 14 11:15:45 2020 +0900
@@ -5,6 +5,7 @@
   case "$S4WORLDLIST" in
     *:*:*)
       worldlistfile=cache/worldlist
+      worldgrpfile=cache/worldgrps
       worldoptionfile=cache/worldoption
       worldnamefile=cache/worldname
       if [ ! -e $worldlistfile -o $worldlistfile -ot s4-config.sh \
@@ -13,7 +14,7 @@
       then
 	echo S4MASTERURL=$S4MASTERURL >> tmp/debug.out
 	cat <<-EOF > $worldlistfile
-	 ▼<div><table>
+	<div><table>
 	 <tr><th>World List</th></tr>
 	 <tr><td title="Base World$nl拠点となるWorldです">&rArr;
 	  <a href="${S4MASTERURL:-$URL}">Base</a></td></tr>
@@ -36,14 +37,18 @@
 	if [ -s "$worldoptionfile" ]; then
 	  echo "<option value=\"s4-config.sh\">Base</option>" >> $worldoptionfile
 	  echo "</table>$nl</div>" >> $worldlistfile
+	  sed 's/href="\([^>]*\)"/href="\1?grps"/' $worldlistfile \
+	      > $worldgrpfile
 	else
 	  true > $worldoptionfile; true > $worldlistfile	# Remove contents
 	  rm -f ${worldnamefile}.*
 	fi
       fi
       if [ -s "$worldlistfile" ]; then
-	S4WORLDS=": spaste(\`$worldlistfile')"
+	S4WORLDS="▼spaste(\`$worldlistfile')"
 	S4WORLDNAME=${S4WORLD:+`cat $worldnamefile.$S4WORLD`}
+	S4WORLDGRPS="▼spaste(\`$worldgrpfile')"
+	err S4WORLDGRPS=$S4WORLDGRPS
       fi
       ;;
   esac

yatex.org