Skip to content

Instantly share code, notes, and snippets.

@psycalc
Created July 23, 2016 13:49
Show Gist options
  • Save psycalc/be5ea1d496c9d1e5596b2a3d73ae2f99 to your computer and use it in GitHub Desktop.
Save psycalc/be5ea1d496c9d1e5596b2a3d73ae2f99 to your computer and use it in GitHub Desktop.
PowerShell create HTML file
If (-Not ( Test-Path ".\index.html" ))
{
New-Item .\index.html -ItemType "file" | out-null
Set-Content .\index.html -Value @"
<!doctype html>
<html>
<head>
<title>$ProjectName</title>
</head>
<body>
<h1>Поздравляю вы развернули среду разработки для проекта $ProjectName</h1>
<p>На гитхабе создан <a href="$result">репозиторий</a>.</p>
</body>
</html>
"@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment