File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,20 @@ osie_download() {
12
12
wget " ${url} " -O " ${directory} " /" ${filename} " .tar.gz
13
13
}
14
14
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
+
15
23
# osie_extract from tarball and save it to directory
16
24
osie_extract () {
17
25
local source_dir=" $1 "
18
26
local dest_dir=" $2 "
19
27
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
21
29
}
22
30
23
31
# osie_move_helper_scripts moves workflow helper scripts to the workflow directory
@@ -64,7 +72,7 @@ main() {
64
72
if [ " ${use_hook} " == " true" ]; then
65
73
if [ ! -f " ${source_dir} " /vmlinuz-x86_64 ] && [ ! -f " ${source_dir} " /initramfs-x86_64 ]; then
66
74
echo " extracting hook..."
67
- osie_extract " ${extract_dir} " " ${source_dir} " " ${filename} "
75
+ hook_extract " ${extract_dir} " " ${source_dir} " " ${filename} "
68
76
else
69
77
echo " hook files already exist, not extracting"
70
78
fi
You can’t perform that action at this time.
0 commit comments