Skip to content

Instantly share code, notes, and snippets.

@karaaie
Last active July 29, 2016 10:37
Show Gist options
  • Save karaaie/b0065963bfbae07dfe7e to your computer and use it in GitHub Desktop.
Save karaaie/b0065963bfbae07dfe7e to your computer and use it in GitHub Desktop.
try {
#Get current dir
$tools = split-path $MyInvocation.MyCommand.Path (1)
#Get parent dir
$parentDir = split-path -parent $tools (2)
#get HelloWorldSite source dir $source = join-path $parentDir "source/*" (3)
#get location of the installtion file
$installFile = join-path $parentDir "installSite.ps1" (4)
Invoke-Expression "$installFile -Sourcefiles $source" (5)
Write-ChocolateySuccess 'HelloWorldSite' (6)
} catch {
Write-Host $_.Exception.Message (7)
Write-Host $_.Exception (8)
Write-ChocolateyFailure 'HelloWorldSite' (9)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment