added logic for gpg and zip

This commit is contained in:
2021-11-24 10:59:26 -05:00
parent a051c3654e
commit 0e1d0d5eb4

View File

@@ -1,8 +1,14 @@
param (
[Parameter(ParameterSetName='One',Mandatory=$true)][switch]$zip,
[Parameter(ParameterSetName='One')][switch]$gpg
[switch]$zip,
[switch]$gpg
)
# the validatescript for the param was not working when -gpg -zip was passed in so this will be the fucntion
if ($gpg -and -not $zip) {
Write-Error "You cannot use -gpg without -zip."
exit 1
}
# get the date/time for the back filename
$dateTime = get-date -format ("yyyyMMdd-HHmmss")
$env:Path += ";$PSScriptRoot\lib;$PSScriptRoot\lib\gpg\bin"