www-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

www/server/staging/proprietary/rec propr-gen


From: Therese Godefroy
Subject: www/server/staging/proprietary/rec propr-gen
Date: Fri, 14 Sep 2018 17:32:24 -0400 (EDT)

CVSROOT:        /webcvs/www
Module name:    www
Changes by:     Therese Godefroy <th_g> 18/09/14 17:32:24

Modified files:
        server/staging/proprietary/rec: propr-gen 

Log message:
        Adapt the script.

CVSWeb URLs:
http://web.cvs.savannah.gnu.org/viewcvs/www/server/staging/proprietary/rec/propr-gen?cvsroot=www&r1=1.1&r2=1.2

Patches:
Index: propr-gen
===================================================================
RCS file: /webcvs/www/www/server/staging/proprietary/rec/propr-gen,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- propr-gen   14 Sep 2018 21:12:47 -0000      1.1
+++ propr-gen   14 Sep 2018 21:32:24 -0000      1.2
@@ -1,11 +1,11 @@
 #!/bin/bash
 
-# Generates pages in proprietary/ from propr-blurbs-html.rec, pages.rec, and
+# Generates pages in proprietary/ from propr-blurbs.rec, pages.rec, and
 # page stubs.
 # Needs Recutils.
+# Call the script from the rec directory.
 
 set -e
-cd ~/GNU/www/proprietary/kitchen
 
 # Convert the blurbs to HTML.
 function rec2html () {
@@ -20,6 +20,9 @@
   fmt -s -w 76 temp1 > temp
 }
 
+# create a dir for the regenerated files.
+mkdir -p ../regenerated
+
 # Get the main keyword for each page.
 keys1=$(recsel -p MainKey propr-pages.rec | sed 's,^MainKey: ,,')
 
@@ -38,7 +41,7 @@
           sed 's,^Sections: ,,')
   # Select complete blurb records corresponding to key1.
   expr="Section ~ '$key1'"
-  recsel -e "$expr" propr-blurbs-html.rec > temp.rec
+  recsel -e "$expr" propr-blurbs.rec > temp.rec
 
   # If section keywords exist,
   if [ -n "$keys2" ]; then
@@ -61,9 +64,9 @@
   fi
 
   sed -i 's/<!-- INSERT .*\.list -->//' $key1.html
-  mv $key1.html ../dining-room/$page
+  mv $key1.html ../regenerated/$page
 
 done
 
-#rm -f temp*
+rm -f temp*
 exit 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]