mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-04 15:51:23 +00:00
android-clt@11076708: Fix persistence (Close #5412)
This commit is contained in:
parent
9c3915b620
commit
2d5226f1a9
@ -15,14 +15,15 @@
|
|||||||
"pre_install": [
|
"pre_install": [
|
||||||
"Rename-Item \"$dir\\cmdline-tools\\cmdline-tools\" -NewName 'latest'",
|
"Rename-Item \"$dir\\cmdline-tools\\cmdline-tools\" -NewName 'latest'",
|
||||||
"# For `env_add_path`:",
|
"# For `env_add_path`:",
|
||||||
"ensure \"$dir\\platform-tools\""
|
"ensure \"$dir\\platform-tools\" | Out-Null"
|
||||||
],
|
],
|
||||||
"post_install": [
|
"post_install": [
|
||||||
"# Persistence",
|
"# Persistence",
|
||||||
"Get-ChildItem \"$persist_dir\\cmdline-tools\" -Exclude 'latest' | Move-Item -Destination \"$dir\\cmdline-tools\" -Force",
|
"Get-ChildItem \"$persist_dir\\cmdline-tools\" -Exclude 'latest' | Move-Item -Destination \"$dir\\cmdline-tools\" -Force",
|
||||||
"@('emulator', 'ndk-bundle', 'platform-tools', 'tools') | ForEach-Object {",
|
"@('emulator', 'ndk-bundle', 'platform-tools', 'tools') | ForEach-Object {",
|
||||||
" if (Test-Path \"$persist_dir\\$_\") {",
|
" if (Test-Path \"$persist_dir\\$_\") {",
|
||||||
" Move-Item \"$persist_dir\\$_\" \"$dir\" -Force",
|
" ensure \"$dir\\$_\" | Out-Null",
|
||||||
|
" Move-Item \"$persist_dir\\$_\\*\" \"$dir\\$_\" -Force",
|
||||||
" }",
|
" }",
|
||||||
"}",
|
"}",
|
||||||
"if (!(Get-Command 'java' -ErrorAction SilentlyContinue)) {",
|
"if (!(Get-Command 'java' -ErrorAction SilentlyContinue)) {",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user