ProvisioningTools.psm1

# Copyright 2019 David Haymond.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.

# Get public and private function definition files.
$public = @(Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue)
$private = @(Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue)

# Dot source the files
Foreach ($import in @($public + $private)) {
    Try {
        . $import.FullName
    }
    Catch {
        Write-Error "Failed to import function $($import.FullName): $_"
    }
}