Initial
This commit is contained in:
19
Chocolatey-tools.psm1
Normal file
19
Chocolatey-tools.psm1
Normal file
@@ -0,0 +1,19 @@
|
||||
# Taken from http://overpoweredshell.com/Working-with-Plaster/
|
||||
|
||||
$functionFolders = @('functions', 'internal', 'classes')
|
||||
ForEach ($folder in $functionFolders)
|
||||
{
|
||||
$folderPath = Join-Path -Path $PSScriptRoot -ChildPath $folder
|
||||
If (Test-Path -Path $folderPath)
|
||||
{
|
||||
Write-Verbose -Message "Importing from $folder"
|
||||
$functions = Get-ChildItem -Path $folderPath -Filter '*.ps1'
|
||||
ForEach ($function in $functions)
|
||||
{
|
||||
Write-Verbose -Message " Importing $($function.BaseName)"
|
||||
. $function.providerpath
|
||||
}
|
||||
}
|
||||
}
|
||||
$publicFunctions = (Get-ChildItem -Path "$PSScriptRoot\functions" -Filter '*.ps1').BaseName
|
||||
Export-ModuleMember -Function $publicFunctions
|
||||
Reference in New Issue
Block a user