Skip to content

Commit 1368a64

Browse files
committed
Initial commit
0 parents  commit 1368a64

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Slack.Backup.psd1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
@{
3+
RootModule = 'Slack.Backup.psm1'
4+
ModuleVersion = '1.0.0'
5+
GUID = '5fca212b-de20-40cb-ba38-e6114263bfaa'
6+
Author = 'Alan Płócieniak'
7+
CompanyName = 'Alan Płócieniak'
8+
Copyright = '(c) 2022 Alan Płócieniak. All rights reserved.'
9+
Description = 'PowerShell module for the Slack backup.'
10+
PowerShellVersion = '5.0'
11+
FunctionsToExport = '*'
12+
PrivateData = @{
13+
PSData = @{
14+
}
15+
}
16+
}

Slack.Backup.psm1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#Get public and private function definition files.
2+
$Public = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue )
3+
$Private = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue )
4+
5+
#Dot source the files
6+
Foreach ($import in @($Public + $Private)) {
7+
try {
8+
. $import.fullname
9+
}
10+
catch {
11+
Write-Error -Message "Failed to import function $($import.fullname): $_"
12+
}
13+
}
14+
Export-ModuleMember -Function $Public.Basename

0 commit comments

Comments
 (0)