fix(ota): remove powershell dependency in nucleus bootstrap command
@@ -59,13 +59,4 @@ Manifests:
bootstrap:
RequiresPrivilege: true
script: >-
- powershell -command "& { Set-StrictMode -Version Latest;
- $ErrorActionPreference = \"Stop\";
- $PSDefaultParameterValues['*:ErrorAction']=\"Stop\";
- $KernelRoot = \"{kernel:rootPath}\";
- $UnpackDir = \"{artifacts:decompressedPath}\aws.greengrass.nucleus\";
- $CurrentDir = Join-Path -Path $KernelRoot -ChildPath \"alts\current\";
- Get-ChildItem -Path $CurrentDir -Force -Recurse | ForEach-Object { $_.Delete() };
- echo {configuration:/jvmOptions} > \"$CurrentDir\launch.params\";
- New-Item -Path \"$CurrentDir\distro\" -ItemType SymbolicLink -Value \"$UnpackDir\";
- exit 100; }"
+ del /q {kernel:rootPath}\alts\current\*&& for /d %x in ({kernel:rootPath}\alts\current\*) do @rd /s /q "%x"&& echo {configuration:/jvmOptions} > {kernel:rootPath}\alts\current\launch.params&& mklink /d {kernel:rootPath}\alts\current\distro {artifacts:decompressedPath}\aws.greengrass.nucleus&& exit 100
