From 45800d723463c677d59ca40ea4ed175772cb1408 Mon Sep 17 00:00:00 2001 From: tech189 Date: Wed, 24 Aug 2022 14:01:04 +0100 Subject: [PATCH 1/2] microsoft*-jdk: Fix extract_dir issues Relates to #390 and https://github.com/ScoopInstaller/Java/commit/901d714b818da4243411c6142427be5239f0e817#commitcomment-82031895 Uses installer script from temurin-nightly-jdk --- bucket/microsoft-lts-jdk.json | 8 +++++++- bucket/microsoft11-jdk.json | 8 +++++++- bucket/microsoft16-jdk.json | 8 +++++++- bucket/microsoft17-jdk.json | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/bucket/microsoft-lts-jdk.json b/bucket/microsoft-lts-jdk.json index e8070f5476a..d10f883b5b4 100644 --- a/bucket/microsoft-lts-jdk.json +++ b/bucket/microsoft-lts-jdk.json @@ -9,7 +9,13 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_dir": "jdk-17.0+4", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft11-jdk.json b/bucket/microsoft11-jdk.json index 87e7578dc0a..23b48535e85 100644 --- a/bucket/microsoft11-jdk.json +++ b/bucket/microsoft11-jdk.json @@ -9,7 +9,13 @@ "hash": "4670febc7d9aa1ad9ac121d46c02ae7041035e262253b9912dba999a9279be75" } }, - "extract_dir": "jdk-11.0+16", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft16-jdk.json b/bucket/microsoft16-jdk.json index 9013e887b9a..174b749fdcd 100644 --- a/bucket/microsoft16-jdk.json +++ b/bucket/microsoft16-jdk.json @@ -9,7 +9,13 @@ "hash": "2911ef05fc64fd9f6a992807416f3806f1862a545fe2fd72b87fcdd1ad9371ca" } }, - "extract_dir": "jdk-16.0.2+7", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft17-jdk.json b/bucket/microsoft17-jdk.json index e8070f5476a..d10f883b5b4 100644 --- a/bucket/microsoft17-jdk.json +++ b/bucket/microsoft17-jdk.json @@ -9,7 +9,13 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_dir": "jdk-17.0+4", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" From e83efbd1f18ff3ecc5ad0cb4c556af7102753067 Mon Sep 17 00:00:00 2001 From: tech189 Date: Wed, 24 Aug 2022 17:20:49 +0100 Subject: [PATCH 2/2] Revert "microsoft*-jdk: Fix extract_dir issues" This reverts commit 45800d723463c677d59ca40ea4ed175772cb1408. --- bucket/microsoft-lts-jdk.json | 8 +------- bucket/microsoft11-jdk.json | 8 +------- bucket/microsoft16-jdk.json | 8 +------- bucket/microsoft17-jdk.json | 8 +------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/bucket/microsoft-lts-jdk.json b/bucket/microsoft-lts-jdk.json index d10f883b5b4..e8070f5476a 100644 --- a/bucket/microsoft-lts-jdk.json +++ b/bucket/microsoft-lts-jdk.json @@ -9,13 +9,7 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_to": "tmp", - "installer": { - "script": [ - "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", - "Remove-Item -Recurse \"$dir\\tmp\"" - ] - }, + "extract_dir": "jdk-17.0+4", "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft11-jdk.json b/bucket/microsoft11-jdk.json index 23b48535e85..87e7578dc0a 100644 --- a/bucket/microsoft11-jdk.json +++ b/bucket/microsoft11-jdk.json @@ -9,13 +9,7 @@ "hash": "4670febc7d9aa1ad9ac121d46c02ae7041035e262253b9912dba999a9279be75" } }, - "extract_to": "tmp", - "installer": { - "script": [ - "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", - "Remove-Item -Recurse \"$dir\\tmp\"" - ] - }, + "extract_dir": "jdk-11.0+16", "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft16-jdk.json b/bucket/microsoft16-jdk.json index 174b749fdcd..9013e887b9a 100644 --- a/bucket/microsoft16-jdk.json +++ b/bucket/microsoft16-jdk.json @@ -9,13 +9,7 @@ "hash": "2911ef05fc64fd9f6a992807416f3806f1862a545fe2fd72b87fcdd1ad9371ca" } }, - "extract_to": "tmp", - "installer": { - "script": [ - "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", - "Remove-Item -Recurse \"$dir\\tmp\"" - ] - }, + "extract_dir": "jdk-16.0.2+7", "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft17-jdk.json b/bucket/microsoft17-jdk.json index d10f883b5b4..e8070f5476a 100644 --- a/bucket/microsoft17-jdk.json +++ b/bucket/microsoft17-jdk.json @@ -9,13 +9,7 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_to": "tmp", - "installer": { - "script": [ - "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", - "Remove-Item -Recurse \"$dir\\tmp\"" - ] - }, + "extract_dir": "jdk-17.0+4", "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir"