mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
48 lines
No EOL
1.6 KiB
PowerShell
48 lines
No EOL
1.6 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Helper script to update submodules.
|
|
|
|
.EXAMPLE
|
|
|
|
PS> .\update_submodules.ps1
|
|
|
|
#>
|
|
|
|
$art = @"
|
|
|
|
. . .. . ..
|
|
_oOOP3OPP3Op_. .
|
|
.PPpo~· ·· ~2p. ·· ···· · ·
|
|
·Ppo · .pPO3Op.· · O:· · · ·
|
|
.3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · ·
|
|
·~OP 3PO· .Op3 : · ·· _____ _____ _____
|
|
·P3O · oP3oP3O3P' · · · · / /·/ /·/ /
|
|
O3:· O3p~ · ·:· · ·/____/·/____/ /____/
|
|
'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · ·
|
|
· ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · ·
|
|
· '_ .. · . _OP3·· · ·https://openpype.io·· ·
|
|
~P3·OPPPO3OP~ · ·· ·
|
|
· ' '· · ·· · · · ·· ·
|
|
|
|
"@
|
|
|
|
Write-Host $art -ForegroundColor DarkGreen
|
|
|
|
function Exit-WithCode($exitcode) {
|
|
# Only exit this host process if it's a child of another PowerShell parent process...
|
|
$parentPID = (Get-CimInstance -ClassName Win32_Process -Filter "ProcessId=$PID" | Select-Object -Property ParentProcessId).ParentProcessId
|
|
$parentProcName = (Get-CimInstance -ClassName Win32_Process -Filter "ProcessId=$parentPID" | Select-Object -Property Name).Name
|
|
if ('powershell.exe' -eq $parentProcName) { $host.SetShouldExit($exitcode) }
|
|
|
|
exit $exitcode
|
|
}
|
|
|
|
$current_dir = Get-Location
|
|
$script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
|
$openpype_root = (Get-Item $script_dir).parent.FullName
|
|
|
|
Set-Location -Path $openpype_root
|
|
|
|
git submodule update --recursive --remote
|
|
|
|
Set-Location -Path $current_dir |