Skip to content

Commit 3cb73a9

Browse files
Fix osie extraction:
The update to fix the Hook download and extract actually broke the existing OSIE extract. This will fix that. Signed-off-by: Jacob Weinstock <[email protected]>
1 parent cbe7079 commit 3cb73a9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

deploy/compose/osie/lastmile.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@ osie_download() {
1212
wget "${url}" -O "${directory}"/"${filename}".tar.gz
1313
}
1414

15+
# hook_extract Hook from a tarball and save it to directory
16+
hook_extract() {
17+
local source_dir="$1"
18+
local dest_dir="$2"
19+
local filename="$3"
20+
tar -zxvf "${source_dir}"/"${filename}".tar.gz -C "${dest_dir}"
21+
}
22+
1523
# osie_extract from tarball and save it to directory
1624
osie_extract() {
1725
local source_dir="$1"
1826
local dest_dir="$2"
1927
local filename="$3"
20-
tar -zxvf "${source_dir}"/"${filename}".tar.gz -C "${dest_dir}"
28+
tar -zxvf "${source_dir}"/"${filename}".tar.gz -C "${dest_dir}" --strip-components 1
2129
}
2230

2331
# osie_move_helper_scripts moves workflow helper scripts to the workflow directory
@@ -64,7 +72,7 @@ main() {
6472
if [ "${use_hook}" == "true" ]; then
6573
if [ ! -f "${source_dir}"/vmlinuz-x86_64 ] && [ ! -f "${source_dir}"/initramfs-x86_64 ]; then
6674
echo "extracting hook..."
67-
osie_extract "${extract_dir}" "${source_dir}" "${filename}"
75+
hook_extract "${extract_dir}" "${source_dir}" "${filename}"
6876
else
6977
echo "hook files already exist, not extracting"
7078
fi

0 commit comments

Comments
 (0)