IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34609


Ignore:
Timestamp:
Oct 25, 2012, 2:15:33 PM (14 years ago)
Author:
eugene
Message:

finish split out of dvodist and ippdata

Location:
branches/eam_branches/ipp-20120905/dvodist
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/dvodist/INSTALL

    r34548 r34609  
    55 psconfigure --htdocs /data/ippc17.0/www/dvodist
    66 make php
     7
     8pikake test examples:
     9psconfigure --htdocs /var/www/ --rootdir /ippdata
     10make ippdata
     11
     12psconfigure --htdocs /var/www/ --rootdir /dvodist
     13make dvodist
  • branches/eam_branches/ipp-20120905/dvodist/Makefile.in

    r34561 r34609  
    7373        @if [ ! -d $(TGT-UTIL) ]; then mkdir -p $(TGT-UTIL) || exit; fi
    7474        rm -f $(TGT-UTIL)/$*.php || exit
    75         $(GENERATE) --htdocs @HTDOCS@ $(SRC-UTIL)/$*.mkd $(TGT-UTIL)/$*.php || exit
     75        $(GENERATE) --htdocs @HTDOCS@ --rootdir @ROOTDIR@ $(SRC-UTIL)/$*.mkd $(TGT-UTIL)/$*.php || exit
    7676
    7777$(TGT-UTIL)/%: $(SRC-UTIL)/%
     
    8484        @if [ ! -d $(TGT-DVODIST) ]; then mkdir -p $(TGT-DVODIST) || exit; fi
    8585        rm -f $(TGT-DVODIST)/$*.php || exit
    86         $(GENERATE) --htdocs @HTDOCS@ $(SRC-DVODIST)/$*.mkd $(TGT-DVODIST)/$*.php || exit
     86        $(GENERATE) --htdocs @HTDOCS@ --rootdir @ROOTDIR@ $(SRC-DVODIST)/$*.mkd $(TGT-DVODIST)/$*.php || exit
    8787
    8888# non-generated php code is copied directly
     
    9696        @if [ ! -d $(TGT-IPPDATA) ]; then mkdir -p $(TGT-IPPDATA) || exit; fi
    9797        rm -f $(TGT-IPPDATA)/$*.php || exit
    98         $(GENERATE) --htdocs @HTDOCS@ $(SRC-IPPDATA)/$*.mkd $(TGT-IPPDATA)/$*.php || exit
     98        $(GENERATE) --htdocs @HTDOCS@ --rootdir @ROOTDIR@ $(SRC-IPPDATA)/$*.mkd $(TGT-IPPDATA)/$*.php || exit
    9999
    100100# non-generated php code is copied directly
  • branches/eam_branches/ipp-20120905/dvodist/configure.tcsh

    r34543 r34609  
    1010
    1111set htdocs  = ""
     12set rootdir = ""
    1213set dbhost  = ""
    1314set dbuser  = ""
     
    5253   endif
    5354   breaksw;
     55  case --rootdir*
     56   if ("$1" == "--rootdir") then
     57     shift
     58     set rootdir = $1
     59   else
     60     set rootdir = `echo $1 | tr = ' ' | awk '{print $2}'`
     61   endif
     62   breaksw;
    5463  case --dbhost*
    5564   if ("$1" == "--dbhost") then
     
    137146
    138147echo
    139 echo "prefix: $prefix"
    140 echo "bindir: $bindir"
    141 echo "libdir: $libdir"
    142 echo "datadir:$datadir"
    143 echo "site:   $site"
    144 echo "htdocs: $htdocs"
    145 echo "dbhost: $dbhost"
    146 echo "dbuser: $dbuser"
    147 echo "dbpass: $dbpass"
    148 echo "DBI:    $DBI"
     148echo "prefix:  $prefix"
     149# echo "bindir:  $bindir"
     150# echo "libdir:  $libdir"
     151# echo "datadir: $datadir"
     152# echo "site:    $site"
     153echo "htdocs:  $htdocs"
     154echo "rootdir: $rootdir"
     155# echo "dbhost:  $dbhost"
     156# echo "dbuser:  $dbuser"
     157# echo "dbpass:  $dbpass"
     158# echo "DBI:     $DBI"
    149159echo
    150160
    151161if ("$htdocs" == "") goto usage
     162if ("$rootdir" == "") goto usage
    152163
    153164# unless we need a db interface, skip this
     
    185196if (-e Makefile) mv -f Makefile Makefile~
    186197cat Makefile.in | sed "s|@HTDOCS@|$htdocs|" > tmp.1
    187 cat tmp.1       | sed "s|@BINDIR@|$bindir|" > Makefile
    188 rm -f tmp.1
     198cat tmp.1       | sed "s|@ROOTDIR@|$rootdir|" > tmp.2
     199cat tmp.2       | sed "s|@BINDIR@|$bindir|" > Makefile
     200rm -f tmp.1 tmp.2
    189201
    190202## # convert raw/site.php.in to raw/site.php
     
    213225USAGE: configure [OPTION]
    214226
    215 set the WWW installation directory root with --htdocs
     227set the internal WWW installation directory root with --htdocs
     228set the external WWW installation directory root with --rootdir
    216229set the IPP installation directory root with --prefix
    217230
    218 set the database host, user, password with: --dbhost, --dbuser, -dbpass
    219  
    220231either --prefix or both --bindir and --libdir and [--datadir or --site] are required
    221232
  • branches/eam_branches/ipp-20120905/dvodist/dvodist/docs.mkd

    r34553 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/dvodist.page.php"; ?>
    22
    33# DVO Documentation
  • branches/eam_branches/ipp-20120905/dvodist/dvodist/help.mkd

    r34553 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/dvodist.page.php"; ?>
    22
    33# DVO Distribution Help
  • branches/eam_branches/ipp-20120905/dvodist/dvodist/test.mkd

    r34553 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/dvodist.page.php"; ?>
    22
    33# DVO Distribution Help
  • branches/eam_branches/ipp-20120905/dvodist/ippdata/docs.mkd

    r34574 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/ippdata.page.php"; ?>
    22
    33# DVO Documentation
  • branches/eam_branches/ipp-20120905/dvodist/ippdata/help.mkd

    r34574 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/ippdata.page.php"; ?>
    22
    33# DVO Distribution Help
  • branches/eam_branches/ipp-20120905/dvodist/ippdata/test.mkd

    r34574 r34609  
    1 <?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
     1<?php include "@HTDOCS@/www-util/ippdata.page.php"; ?>
    22
    33# DVO Distribution Help
  • branches/eam_branches/ipp-20120905/dvodist/src/generate

    r34546 r34609  
    55
    66set htdocs  = ""
     7set rootdir  = ""
    78set args    = ""
    89set VERBOSE = 0
     
    1617   else
    1718     set htdocs = `echo $1 | tr = ' ' | awk '{print $2}'`
     19   endif
     20   breaksw;
     21  case --rootdir*
     22   if ("$1" == "--rootdir") then
     23     shift
     24     set rootdir = $1
     25   else
     26     set rootdir = `echo $1 | tr = ' ' | awk '{print $2}'`
    1827   endif
    1928   breaksw;
     
    3645if ($VERBOSE) then
    3746  echo
    38   echo "htdocs: $htdocs"
    39   echo "input : $args[1]"
    40   echo "output: $args[2]"
     47  echo "htdocs : $htdocs"
     48  echo "rootdir: $rootdir"
     49  echo "input  : $args[1]"
     50  echo "output : $args[2]"
    4151endif
    4252
    4353if ("$htdocs" == "") goto usage
     54if ("$rootdir" == "") goto usage
    4455
    45 cat $args[1] | sed "s|@HTDOCS@|$htdocs|" > $args[2]
     56cat $args[1] | sed "s|@HTDOCS@|$htdocs|" | sed "s|@ROOTDIR@|$rootdir|" > $args[2]
    4657exit 0
    4758
     
    5970  replace install-time options in scripts
    6071 
    61   set the WWW installation directory root with --htdocs
    62  
     72  set the WWW installation directory root with --htdocs (top on server)
     73  set the WWW top-level directory with --rootdir (top seen by client)
     74   
    6375  switches:
    6476    -h, --help              display this help and exit
    65     --htdocs (required)     set the top-level directory
     77    --htdocs (required)     set the top-level directory (internal)
     78    --rootdir (required)    set the top-level directory (external)
    6679
    6780EOF
  • branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.page.mkd

    r34574 r34609  
    1414  $rootdir = "";
    1515 } else {
    16   $rootdir = "/dvodist/dvodist";
     16  $rootdir = "@ROOTDIR@";
    1717 }
    1818
  • branches/eam_branches/ipp-20120905/dvodist/www-util/ipp.php

    r34551 r34609  
    11<?php
    22
    3 global $realroot;
    4 $realroot = "/dvodist";
     3global $rootdir;
    54
    65function head ($title) {
     
    7776    }
    7877
    79     global $realroot;
     78    global $rootdir;
    8079
    8180    // hi-lite the current page (use select-style, not style)
    8281    $thisname = $_SERVER[SCRIPT_NAME];
    83     $page = $realroot . $base;
     82    $page = $rootdir . $base;
    8483    if ($page == $thisname) {
    8584      $style = trim($line[1]);
     
    121120
    122121function dirlist ($source) {
     122  if (!file_exists($source)) return;
     123
    123124  $file = fopen ($source, "r");
    124125  echo "<table class=\"dirlist\">\n";
     
    139140    // }
    140141
    141     if (count($line) != 4) continue;
    142 
    143     $name  = trim($line[0]);
    144     $type  = trim($line[1]);
    145     $style = trim($line[2]);
    146     $info  = trim($line[3]);
     142    if ((count($line) != 4) && (count($line) != 5)) continue;
     143
     144    // support both the old and new style tables:
     145    // old: name | type | style | info
     146    // new: name | link | type | style | info
     147
     148    if (count($line) == 4) {
     149      echo "count = 4<br>\n";
     150      $name  = trim($line[0]);
     151      $type  = trim($line[1]);
     152      $style = trim($line[2]);
     153      $info  = trim($line[3]);
     154      $link  = $name;
     155    }
     156    if (count($line) == 5) {
     157      echo "count = 5<br>\n";
     158      $name  = trim($line[0]);
     159      $link  = trim($line[1]);
     160      $type  = trim($line[2]);
     161      $style = trim($line[3]);
     162      $info  = trim($line[4]);
     163    }
    147164
    148165    switch ($type) {
     
    172189    if (ereg ('^[:blank:]*#', $line[0])) continue;
    173190    if (count($line) < 2) continue;
    174     if (count($line) != 4) continue;
    175 
    176     $name  = trim($line[0]);
    177     $type  = trim($line[1]);
    178     $style = trim($line[2]);
    179     $info  = trim($line[3]);
     191
     192    if ((count($line) != 4) && (count($line) != 5)) continue;
     193
     194    // support both the old and new style tables:
     195    // old: name | type | style | info
     196    // new: name | link | type | style | info
     197
     198    if (count($line) == 4) {
     199      $name  = trim($line[0]);
     200      $type  = trim($line[1]);
     201      $style = trim($line[2]);
     202      $info  = trim($line[3]);
     203      $link  = $name;
     204    }
     205    if (count($line) == 5) {
     206      $name  = trim($line[0]);
     207      $link  = trim($line[1]);
     208      $type  = trim($line[2]);
     209      $style = trim($line[3]);
     210      $info  = trim($line[4]);
     211    }
    180212
    181213    switch ($type) {
     
    195227
    196228function verbatim ($source) {
     229  if (!file_exists($source)) return;
     230
    197231  $file = fopen ($source, "r");
    198232
     
    218252// lines which start with @ are processed by 'dirlist', all others are processed by Markdown
    219253function do_markdown ($source) {
     254  if (!file_exists($source)) return;
     255
    220256  $file = fopen ($source, "r");
    221257
  • branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.page.mkd

    r34574 r34609  
    1414  $rootdir = "";
    1515 } else {
    16   $rootdir = "/dvodist/ippdata";
     16  $rootdir = "@ROOTDIR@";
    1717 }
    1818
Note: See TracChangeset for help on using the changeset viewer.