fa_icons::download (private)

 fa_icons::download [ -version version ]

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

Download Font Awesome 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/fa-icons/www/sitewide-admin/download.tcl packages/fa-icons/ www/sitewide-admin/download.tcl fa_icons::download fa_icons::download packages/fa-icons/www/sitewide-admin/download.tcl->fa_icons::download fa_icons::resource_info fa_icons::resource_info (public) fa_icons::download->fa_icons::resource_info util::resources::download util::resources::download (public) fa_icons::download->util::resources::download util::unzip util::unzip (public) fa_icons::download->util::unzip util::which util::which (public) fa_icons::download->util::which

Testcases:
No testcase defined.
Source code:

        set resource_info [resource_info -version $version]

        #
        # If no version is specified, use the version from resouce_info
        #
        if {$version eq ""} {
            set version [dict get $resource_info configuredVersion]
        }

        ::util::resources::download -resource_info $resource_info

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

        #
        # Do we have unzip installed?
        #
        set unzip [::util::which unzip]
        if {$unzip eq ""} {
            error "can't install Font Awesome 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: