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() {
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
1624osie_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
You can’t perform that action at this time.
0 commit comments