mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-09 01:25:04 +01:00
14 lines
414 B
PowerShell
Executable File
14 lines
414 B
PowerShell
Executable File
|
|
try {
|
|
"⏳ Installing OctoPrint (snap 'octoprint-pfs', channel 'edge')..."
|
|
|
|
& sudo snap install octoprint-pfs --edge
|
|
if ($lastExitCode -ne "0") { throw "'snap install octoprint-pfs' exited with code $lastExitCode" }
|
|
|
|
"HINT: Access Octoprint's web login at: http://<HOSTNAME>:5000"
|
|
exit 0 # success
|
|
} catch {
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
exit 1
|
|
}
|