add extracting to base build script

This commit is contained in:
emilyd 2022-12-02 16:04:56 +02:00
parent 4375677b8b
commit 4789a4a144

View File

@ -79,6 +79,16 @@ for (( i=0; i<${#package_names[@]}; i++ )); do
printf "%b\n" "$error_message"
die "downloading package failed"
fi
printf "Extracting %s " "${package_names[$i]}"
printf "v%s... " "${package_versions[$i]}"
# shellcheck disable=SC2001 disable=SC2086
tarball_location="$(echo ${package_sources[$i]} | sed 's@.*/@@')"
if eval tar -C tmp -xf "tmp/$tarball_location"; then
printf "%b\n" "$success_message"
else
printf "%b\n" "$error_message"
die "extracting package failed"
fi
done
printf "\n"