conditional_reexec

Name

conditional_reexec  --  fetch a file or package and reexecute conditionally

Synopsis

conditional_reexec {package} [rev=revision] [root=url] [dest=directory]

Description

conditional_reexec fetches a file or package and re-executes the caller script if the specified file or package does not exist in the local tree or if fetch was forced by option.

It is meant to be used to fetch the specified revision of the functions file (this file) if fetch is forced by option. Using this function will eliminate the need of option parsing in the configure(1)-script to force update of the functions file when fetch is forced by option.

Options

dest=directory

The destination directory of the file or package to fetch.

rev=revision

The revision of the file or package to fetch.

root=url

The repository root of the file or package to fetch.

Caveats

When the script is given the option --ignore-cvs-revisions, conditional_reexec will only update package to HEAD if it does not exist. Therefore, either --force-fetch or --update must also be given if you want to make sure that revision HEAD of package is checked out.

Example

Make sure the functions file is up to date:

    conditional_reexec configure-files/source/functions rev=R1_2_0
    

See Also

configure(1), fetch(3), repository_root(3)