Changeset 24297


Ignore:
Timestamp:
2011-07-20T18:52:50+12:00 (13 years ago)
Author:
ak19
Message:

Improvement to code committed previously: Fixed a bug introduced with the reset-gsdlhome target where any non-standard collecthome value written into the gsdlsite.cfg was lost on startup, since reset-gsdlhome always regenerated gsdlsite.cfg from the template file. Now, the relocation code of the reset-gsdlhome target doesn't get exected every time, only when the gsdlhome property in gsdlsite.cfg is different from GSDLHOME var (which points to the current greenstone installation directory.)

Location:
main/trunk/greenstone2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/mkcol.pl

    r22219 r24297  
    353353    # load default plugins if none were on command line
    354354    if (!scalar(@plugin)) {
    355     @plugin = (ZIPPlugin,GreenstoneXMLPlugin,TextPlugin,HTMLPlugin,EmailPlugin,
     355    @plugin = (ZIPPlugin,GreenstoneXMLPlugin,EmbeddedMetadataPlugin,TextPlugin,HTMLPlugin,EmailPlugin,
    356356           PDFPlugin,RTFPlugin,WordPlugin,PostScriptPlugin,PowerPointPlugin,ExcelPlugin,ImagePlugin,ISISPlugin,NulPlugin,MetadataXMLPlugin,ArchivesInfPlugin,DirectoryPlugin);
    357357    }
  • main/trunk/greenstone2/build-src/packages/Makefile

    r23800 r24297  
    3232PACKAGEDIRS =
    3333
    34 USE_WVWARE=0
     34USE_WVWARE=1
    3535ifeq ($(USE_WVWARE), 1)
    3636PACKAGEDIRS += wv/wv-gs
  • main/trunk/greenstone2/collect/demo/etc/collect.cfg

    r23487 r24297  
    1515# following two plugins not needed for the demo collection, but are useful to
    1616# include for tutorial purposes
    17 plugin  ImagePlugin
    18 plugin  ZIPPlugin
     17plugin  ImagePlugin
     18plugin  ZIPPlugin
    1919plugin  MetadataXMLPlugin
    2020plugin  ArchivesInfPlugin
     
    2525classify    Hierarchy -metadata dls.Subject -sort dls.Title
    2626
    27 classify    List -sort_leaf_nodes_using dls.Title -metadata dls.Organization -bookshelf_type always -partition_type_within_level constant_size
     27classify    List -metadata dls.Organization -sort_leaf_nodes_using dls.Title -bookshelf_type always -partition_type_within_level constant_size
    2828
    2929classify    List -metadata dls.Keyword -partition_type_within_level constant_size -buttonname Howto
  • main/trunk/greenstone2/collect/modelcol/etc/collect.cfg

    r22353 r24297  
    66infodbtype  **infodbtype**
    77
    8 indexes     text dc.Title,ex.Title ex.Source
     8indexes     text dc.Title,ex.dc.Title,ex.Title ex.Source
    99defaultindex    text
    1010
     
    2020collectionmeta collectionextra   "**about**"
    2121collectionmeta  .text "_labeltext_"
    22 collectionmeta  .dc.Title,Title "_labelTitle_"
     22collectionmeta  .dc.Title,ex.dc.Title,ex.Title "_labelTitle_"
    2323collectionmeta  .Source "_labelSource_"
    2424collectionmeta .document "_textdocument_"
  • main/trunk/greenstone2/etc/main.cfg

    r23820 r24297  
    2323# Set status to "enabled" if you want the Maintenance and
    2424# Administration facility to be available.
    25 status      disabled
     25#status     disabled
     26status      enabled
    2627
    2728# Set collector to "enabled" if you want the "collector"
  • main/trunk/greenstone2/etc/oai.cfg

    r23235 r24297  
    4242
    4343# The OAI repository name - human readable
    44 repositoryName ""
     44#repositoryName ""
     45repositoryName "Greenstone"
    4546
    4647# The OAI repository domain name or unique identifier - used for generating
    4748# the document identifiers, which will be like:
    4849# oai:reposId:coll:oid
    49 repositoryId ""
     50#repositoryId ""
     51repositoryId "greenstone"
    5052
    5153# version is which oai id scheme is used for ids. Can be 1.1 or 2.0.
     
    7577# and this is followed by one or more collection names. The collection name
    7678# is the name of the collection's folder in the collect directory.
    77 oaicollection demo documented-examples/oai-e
     79oaicollection demo documented-examples/oai-e oaipdf
    7880
    7981# Optional, set name and description for each collection
  • main/trunk/greenstone2/gsicontrol.bat

    r24295 r24297  
    178178:: reset-gsdlhome forces configure-cgi by renaming any
    179179:: existing gsdlsite.cfg and by deleting Mac .app files
     180:: However, we only relocate if there is a gsdlsite.cfg file with its gsdlhome
     181:: property the same as the current (greenstone installation) directory
    180182:resethome
    181183echo.
    182 if exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" (
    183     move "%GSDLHOME%\%cgibin%\gsdlsite.cfg" "%GSDLHOME%\%cgibin%\gsdlsite.cfg.bak" 
    184     echo **** Regenerating %GSDLHOME%\%cgibin%\gsdlsite.cfg
    185     echo **** Previous version of file now %GSDLHOME%\%cgibin%\gsdlsite.cfg.bak
    186 )
    187 
     184if not exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" goto relocate
     185
     186FOR /F "tokens=2" %%G IN ('findstr /R ^gsdlhome "%cgibin%\gsdlsite.cfg"') do set gshome=%%G
     187if "x%gshome%" == "x%GSDLHOME%" set gshome=& goto exit
     188 
     189move "%GSDLHOME%\%cgibin%\gsdlsite.cfg" "%GSDLHOME%\%cgibin%\gsdlsite.cfg.bak"
     190echo **** Regenerating %GSDLHOME%\%cgibin%\gsdlsite.cfg
     191echo **** Previous version of file now %GSDLHOME%\%cgibin%\gsdlsite.cfg.bak
     192set gshome=
     193
     194:relocate
    188195for /F "delims=*" %%T in ('"echo %GSDLHOME%| %_sed% s@\\@\/@g"') do set safepath=%%T
    189196
     
    214221%_sed% "s@\*\*GSDLHOME\*\*@\"%safepath%\"@g" "%cgibin%\gsdlsite.cfg.in" >> "%cgibin%\gsdlsite.cfg"
    215222set safepath=
    216 
    217 if exist "%cgibin%\gsdlsite.cfg.bak" FOR /F "tokens=2" %%G IN ('findstr /R ^collecthome "%cgibin%\gsdlsite.cfg.bak"') do set colhome=%%G
    218 if not "%colhome%" == "" echo collecthome %colhome% >> "%cgibin%\gsdlsite.cfg"& echo. >> "%cgibin%\gsdlsite.cfg"
    219 set colhome=
    220223
    221224goto cgifin
  • main/trunk/greenstone2/gsicontrol.sh

    r24295 r24297  
    4141    echo "" >> "$cgibin/gsdlsite.cfg" ;
    4242    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
    43 # preserve the user-assigned collecthome property, if any
    44     if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; then
    45         collecthome=`egrep "^collecthome" "$cgibin/gsdlsite.cfg.bak" | awk '{print $2}'` ;
    46         if test -n $collecthome ; then
    47         echo "collecthome $collecthome" >> "$cgibin/gsdlsite.cfg" ;
    48         echo "" >> "$cgibin/gsdlsite.cfg" ;
    49         fi
    50     fi
    5143    else
    5244    echo "WARNING: Nothing done for make configure-cgi." ;
     
    175167}
    176168
    177 # forces configure-cgi by deleting gsdlsite.cfg
     169# Forces configure-cgi by renaming gsdlsite.cfg
     170# but only if we actually *need* to relocate gsdlhome.
     171# We relocate at all times, except when there is a gsdlsite.cfg file with its
     172# gsdlhome property the same as the current (greenstone installation) directory
    178173function reset-gsdlhome {
    179174    echo "" ;
     175    relocate=yes ;
    180176    if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then
    181     /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
    182     echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ;
    183     echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
    184     fi
    185 
    186     apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH"
    187 
    188     if test ! -e "$apache_home_os/bin/apachectl.in" ; then
    189     make apache-for-dist
    190     fi
     177    stored_gsdlhome=`egrep "^gsdlhome" "$cgibin/gsdlsite.cfg" | awk '{print $2}'` ;
     178    if [ "x$stored_gsdlhome" != "x$GSDLHOME" ]; then
     179        /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
     180        echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ;
     181        echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
     182    else
     183        relocate=
     184    fi
     185    fi 
    191186   
    192     replace_list="conf/extra/httpd-dav.conf \
     187    if [ "x$relocate" = "xyes" ]; then
     188    apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH"
     189   
     190    if test ! -e "$apache_home_os/bin/apachectl.in" ; then
     191        make apache-for-dist
     192    fi
     193   
     194    replace_list="conf/extra/httpd-dav.conf \
    193195            conf/extra/httpd-manual.conf \
    194196            conf/extra/httpd-autoindex.conf \
     
    218220            include/ap_config_layout.h"
    219221
    220     for one_file in apachectl envvars envvars-std ; do
    221     /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"
    222     done
    223    
    224     for one_file in $replace_list ; do
    225     /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"
    226     done
    227    
    228     /bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config"
    229    
    230     /bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config"
    231    
    232     /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
    233 
     222    for one_file in apachectl envvars envvars-std ; do
     223        /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"
     224    done
     225   
     226    for one_file in $replace_list ; do
     227        /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"
     228    done
     229   
     230    /bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config"
     231   
     232    /bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config"
     233   
     234    /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
     235   
    234236# replace template files with active versions. The following will generate a httpd.conf
    235237# file with placeholder strings, all of which we'll replace shortly hereafter.
    236     bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
    237    
    238     log4jprop=$GSDLHOME/lib/java/log4j.properties
    239     sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop"
    240 
    241     for one_file in gs2-server.app gli.app client-gli.app gems.app ; do
    242     if test -e "$one_file/Contents/document.wflow" ; then
    243         rm -f "$one_file/Contents/document.wflow"
    244     fi
    245     done
    246 
    247     configure-web $1
     238    bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
     239   
     240    log4jprop=$GSDLHOME/lib/java/log4j.properties
     241    sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop"
     242   
     243    for one_file in gs2-server.app gli.app client-gli.app gems.app ; do
     244        if test -e "$one_file/Contents/document.wflow" ; then
     245        rm -f "$one_file/Contents/document.wflow"
     246        fi
     247    done
     248   
     249    configure-web $1
     250    fi
    248251}
    249252
Note: See TracChangeset for help on using the changeset viewer.