mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-26 09:53:57 +01:00
14 lines
414 B
PowerShell
14 lines
414 B
PowerShell
|
|
try {
|
|
"⏳ Installing OctoPrint (snap 'octoprint-sdev', latest stable version)..."
|
|
|
|
& sudo snap install octoprint-sdev --beta
|
|
if ($lastExitCode -ne "0") { throw "Can't install OctoPrint, is it already installed?" }
|
|
|
|
"HINT: Access Octoprint's web login at: http://<HOSTNAME>:5000"
|
|
exit 0 # success
|
|
} catch {
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
exit 1
|
|
}
|