ctkBuildHomepage

        This script performs the following tasks:
        - copy the published files from the project folder
          into the homepage folder. From there down they are ready
          to be sent later on to the IP server by means of FTP.
        - copy the content from the given homepage folder to a new one.
          In this case a target folder and the option -f must be specified
          at the command line.
        Each task processes a list of data items.
        Data items are groups of existing files which have to be copied into a target location.
        Each data item is processed individually, but they share source root path and the same target root path
        Data items may be
                - a list of files located in a subdir,
                - all files and subdir of a subdir or
                - a single file
        Thus, a list of data items are defined by means of a list of metadata objects.
        The properties of the metadata objects are
                - source     relpath to the common source root of the object
                - mask       file mask (or even basename) of the object
                - state      1 : object is processed, 0 object is discarded
                - target     relpath to the common target root object
                - process    code to be executed to process the object
        The definition of source, target or mask can contain the placeholder <version>
        in order to be replaced by the actual version identification i.e. 4.011.
        This replacement is done before the execution of the file selection, so it
        doesn't influence the file globbing.
        Following metadata objects has been implemented:
                - Maintenance doc:    ./doc/ClickTk_*.html
                - Examples:           ./homepage/Examples
                - HTML-pages:           ./homepage/hp*.html
                - Index                 ./homepage/index.html
                - Images              ./homepage/img
                - Install notes:      ./doc/ClickTk_readme.html
                - Demo appl doc:
                      page:           ./doc/demo_application_hours.htm
                      files:          ./doc/demo_application_hours-Dateien/*.*
                - Prog guide:         ./doc/pguide/*.html
                - Prog guide img:     ./doc/img/*.html
                - Screen shots:       ./doc/userDoc/screens/*.*
                - User's doc:         ./doc/userDoc/User_doc.html
                - User's doc Screens: ./doc/userDoc/screens/*.*
                - Notes:              ./doc/Notes/*.jpg
                - Downloads:
                        - windows:        ../clickTkDeliver/clickTk-<version>.zip
                        - UNIX:           ../clickTkDeliver/<version>/clickTk-<version>.tar.gz
                        - Examples:       ./project/Examples-<version>.zip
                        - License:        ./doc/LICENSE.txt
                        - User doc:       ./doc/user_doc/User_doc-<version>.zip
                - Diagrams:           ./doc/diagrams/DFD_logical_view_0.jpg
                - Design sheet:       ./demo_sketch.gif

Programming notes

Process
        - traceMetaData(<source>,<mask>,<target>)
        - copyFile(<source>,<mask>,<target>)
        - copyFolder(<source>,<mask>,<target>)
        - copyFolderAll(<source>,<mask>,<target>)
        A file is processed only if target and source content are not identical.
        Each process returns the number of file successfully copied.
        Each process issues a die exception if the copy cannot be done.
Dummy process
        Dummy process must return the value 0.

_glob

        Execute CORE::glob with the given arguments.
        Return the list of files found or
        the number of files found depending on context.

_collectFiles

        Collect all files existing in the given subdir
        which match the given mask and build the relpath and
        return the list as array or ref to array depending on context.
        Arguments
                subdir
                mask
        Return
                array or ref to array
        Exceptions
                None

_system

        Prepare commands and execute them,
        whereby each command must begin with a command verb.
        Return either an array os status code or a string
        of the concatenated status code depending on context.

Back to index