1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-17 21:27:07 +00:00
termux-packages/scripts/build/get_source/termux_step_get_source.sh
Henrik Grimler 4e902a41a5 building packages: create termux_step_get_source function
Calls termux_git_clone_src if TERMUX_PKG_SRCURL ends with .git, and
termux_download_src_archive and termux_extract_src_archive otherwise.
termux_step_extract_package has been split up into the latter two
functions.

termux_step_post_extract_package has been renamed to
termux_step_post_get_source to reflect these changes.
2020-07-21 10:14:00 +02:00

11 lines
238 B
Bash

termux_step_get_source() {
if [ "${TERMUX_PKG_SRCURL: -4}" == ".git" ]; then
termux_git_clone_src
else
mkdir -p $TERMUX_PKG_SRCDIR
termux_download_src_archive
cd $TERMUX_PKG_TMPDIR
termux_extract_src_archive
fi
}