version-generate-info.tcl

Generates a package spec.

Location:
/packages/acs-admin/www/apm/version-generate-info.tcl
Author:
Jon Salz [jsalz@arsdigita.com]
Created:
9 May 2000
CVS ID:
$Id: version-generate-info.tcl,v 1.7 2018/01/19 21:23:51 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract { 
    Generates a package spec.

    @param version_id The package to be processed.
    @param write_p Set to 1 if you want the specification file written to disk.
    @author Jon Salz [jsalz@arsdigita.com]
    @creation-date 9 May 2000
    @cvs-id $Id: version-generate-info.tcl,v 1.7 2018/01/19 21:23:51 gustafn Exp $
} {
    {version_id:naturalnum,notnull}
    {write_p:boolean 0}
}

if { $write_p } {
    if { [catch { apm_package_install_spec $version_id } error] } {
    ad_return_error "Error" "Unable to create the specification file:
<blockquote><pre>$error</pre></blockquote>
"
        return
    }

    ad_returnredirect "version-view?version_id=$version_id"
    ad_script_abort
} else {
    ns_return 200 text/plain [apm_generate_package_spec $version_id]
    ad_script_abort
}



# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: