0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-04 08:18:54 +00:00
termux-packages/scripts/build/get_source/termux_step_get_source.sh
Henrik Grimler 20bd0f0dc0 scripts: use git+[...] instead of [...].git for git urls
Not all source code hosters support the .git suffix (for example
sourcehut).  Use a git+ prefix instead to indicate that a url is a git
repo.
2023-01-01 18:31:38 +01:00

16 lines
413 B
Bash

termux_step_get_source() {
: "${TERMUX_PKG_SRCURL:=""}"
if [ "${TERMUX_PKG_SRCURL:0:4}" == "git+" ]; then
termux_git_clone_src
else
if [ -z "${TERMUX_PKG_SRCURL}" ] || [ "${TERMUX_PKG_SKIP_SRC_EXTRACT-false}" = "true" ] || [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then
mkdir -p "$TERMUX_PKG_SRCDIR"
return
fi
termux_download_src_archive
cd $TERMUX_PKG_TMPDIR
termux_extract_src_archive
fi
}