bootstrap_icons::download (private)

 bootstrap_icons::download [ -version version ]

Defined in packages/bootstrap-icons/tcl/resource-procs.tcl

Download Bootstrap Icons in the specified version and put it into a directory structure similar to the CDN to support the installation of multiple versions.

Switches:
-version
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/bootstrap-icons/www/sitewide-admin/download.tcl packages/bootstrap-icons/ www/sitewide-admin/download.tcl bootstrap_icons::download bootstrap_icons::download packages/bootstrap-icons/www/sitewide-admin/download.tcl->bootstrap_icons::download bootstrap_icons::resource_info bootstrap_icons::resource_info (public) bootstrap_icons::download->bootstrap_icons::resource_info util::resources::download util::resources::download (public) bootstrap_icons::download->util::resources::download util::unzip util::unzip (public) bootstrap_icons::download->util::unzip util::which util::which (public) bootstrap_icons::download->util::which

Testcases:
No testcase defined.
Source code:
        #
        # If no version is specified, use the namespaced variable.
        #
        if {$version eq ""} {
            set version ${::bootstrap_icons::version}
        }

        set resource_info [resource_info -version $version]
        ::util::resources::download  -resource_info $resource_info  -version_dir $version

        set resourceDir [dict get $resource_info resourceDir]
        ns_log notice " ::bootstrap_icons::download resourceDir $resourceDir"

        #
        # Do we have unzip installed?
        #
        set unzip [::util::which unzip]
        if {$unzip eq ""} {
            error "can't install Bootstrap Icons locally; no unzip program found on PATH"
        }

        #
        # Do we have a writable output directory under resourceDir?
        #
        if {![file isdirectory $resourceDir]} {
            file mkdir $resourceDir
        }
        if {![file writable $resourceDir]} {
            error "directory $resourceDir is not writable"
        }

        #
        # So far, everything is fine, unpack the downloaded zip file
        #
        foreach url [dict get $resource_info downloadURLs] {
            set fn [file tail $url]
            util::unzip  -overwrite  -source $resourceDir/$version/$fn  -destination $resourceDir
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: