Skip to content

Commit

Permalink
Stop using --strip on tar commands
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Jan 19, 2021
1 parent 3567fcf commit 8cc4dfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion buildenv/jenkins/getDependency
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def testBuild() {
if( params.BUILD_TYPE == "systemtest" ){
sh 'curl -OLJks "https://api.adoptopenjdk.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"'
sh 'mkdir ${WORKSPACE}/j2sdk-image'
sh 'tar -xzf OpenJDK8U-jdk_x64_linux_hotspot*.gz -C ${WORKSPACE}/j2sdk-image --strip-components 1'
sh -c 'mkdir dir.$$ && cd dir.$$ && gzip -cd ../OpenJDK8U-jdk_x64_linux_hotspot*.gz | tar xpf - && mv */* ${WORKSPACE}/j2sdk-image && cd .. && rm -rf dir.$$'
sh '${WORKSPACE}/j2sdk-image/jre/bin/java -version'
sh 'git clone https://github.com/AdoptOpenJDK/openjdk-systemtest'
sh 'git clone https://github.com/AdoptOpenJDK/stf'
Expand Down
4 changes: 2 additions & 2 deletions get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ getBinaryOpenjdk()
if [[ $jar_name == *zip || $jar_name == *jar ]]; then
unzip -q $jar_name -d $extract_dir
else
# some debug-image tar has parent folder. --strip 1 is used to remove it
gzip -cd $jar_name | tar xof - -C $extract_dir --strip 1
# some debug-image tar has parent folder. This is like gtar --strip 1
mkdir dir.$$ && cd dir.$$ && gzip -cd ../$jar_name | tar xof - && mv */* ../$extract_dir && cd .. && rm -rf dir.$$
fi
else
if [ -d "$SDKDIR/openjdkbinary/tmp" ]; then
Expand Down

0 comments on commit 8cc4dfd

Please sign in to comment.