1 # ===================================================================== 2 # widgets.rc: W-TW widget builder. 3 # 4 # Copyright (c) 2007,2008,2009,2010 Carlo Strozzi 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; version 2 dated June, 1991. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 # 19 # ===================================================================== 20 21 # ===================================================================== 22 # This program must be run after the group+cf has been read. 23 # ===================================================================== 24 25 ~ $widget_input () && csaExit.fault 0041 widget_input 26 ~ $'tbl_group.k_group' () && csaExit.fault 0041 tbl_group.k_group 27 ~ $tw_gstem () && csaExit.fault 0041 tw_gstem 28 ~ $gencal_xml () && csaExit.fault 0041 gencal_xml 29 ~ $gencal_rcs () && csaExit.fault 0041 gencal_rcs 30 ~ $genarch_xml () && csaExit.fault 0041 genarch_xml 31 ~ $genarch_rcs () && csaExit.fault 0041 genarch_rcs 32 ~ $gencat_xml () && csaExit.fault 0041 gencat_xml 33 ~ $gencat_rcs () && csaExit.fault 0041 gencat_rcs 34 35 # In case the versioning subdir does not exist yet (no TPC needed here). 36 mkdir -p $tw_gstem/RCS || csaExit.fault 0003 mkdir 37 38 # Create page table if it does not yet exist (no TPC needed here). 39 40 if (!csaIsFullPath --exists --quiet $tw_gstem/page+dat) { 41 maketable --input \ 42 $CSA_ROOT/lib/page.xrf > $tw_gstem/page+dat || 43 csaExit.fault 0003 maketable 44 } 45 46 do_commit = () 47 48 # Build the calendar widget if missing/requested. 49 if (~ $widget_force 1 || !csaIsFullPath --exists --quiet $gencal_xml) { 50 csaOpen --fast --relaxed $gencal_xml || csaExit.fault 51 gencal_out = $CSA_RESULT 52 gencal_pages = $widget_input 53 . $CSA_ROOT/lib/gencal.rc || csaExit.fault 54 csaTrapFile $gencal_rcs 55 do_commit = 1 56 } 57 58 # Build the yearly archives list if missing/requested. 59 if (~ $widget_force 1 || !csaIsFullPath --exists --quiet $genarch_xml) { 60 genarch_xml = $tw_gstem/year-links+xml 61 csaOpen --fast --relaxed $genarch_xml || csaExit.fault 62 genarch_out = $CSA_RESULT 63 genarch_pages = $widget_input 64 . $CSA_ROOT/lib/genarch.rc || csaExit.fault 65 csaTrapFile $genarch_rcs 66 do_commit = 1 67 } 68 69 # Build the category list if missing/requested. 70 if (~ $widget_force 1 || !csaIsFullPath --exists --quiet $gencat_xml) { 71 gencat_xml = $tw_gstem/cat-links+xml 72 csaOpen --fast --relaxed $gencat_xml || csaExit.fault 73 gencat_out = $CSA_RESULT 74 gencat_pages = $widget_input 75 . $CSA_ROOT/lib/gencat.rc || csaExit.fault 76 csaTrapFile $gencat_rcs 77 do_commit = 1 78 } 79 80 # End of program.