forked from kiss-community/kiss
kiss: unify pkg_source_
This commit is contained in:
parent
47a4b2b769
commit
29c57a0115
17
kiss
17
kiss
@ -358,7 +358,7 @@ pkg_source_resolve() {
|
|||||||
# Git repository.
|
# Git repository.
|
||||||
if null "${2##git+*}"; then
|
if null "${2##git+*}"; then
|
||||||
_res=$2
|
_res=$2
|
||||||
_des=$src_dir/$1/${3:+"$3/"}${2##*/}
|
_des=$src_dir/$1/${3:+"$3/"}${2##*/}/
|
||||||
_des=${_des%[@#]*}
|
_des=${_des%[@#]*}
|
||||||
|
|
||||||
# Remote source (cached).
|
# Remote source (cached).
|
||||||
@ -414,16 +414,9 @@ pkg_source() {
|
|||||||
|
|
||||||
# '$2' is set when this function is called from 'kiss c' and it is used
|
# '$2' is set when this function is called from 'kiss c' and it is used
|
||||||
# here to skip calling the Git code.
|
# here to skip calling the Git code.
|
||||||
case $2$_res in
|
case $2$_res in "$2url+"*|git+*)
|
||||||
"$2url+"*)
|
mkcd "${_des%/*}"
|
||||||
mkcd "${_des%/*}"
|
"pkg_source_${_res%%+*}" "$_des" "${_res##"${_res%%+*}+"}"
|
||||||
pkg_source_get "$_des" "${_res##url+}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
git+*)
|
|
||||||
mkcd "$_des"
|
|
||||||
pkg_source_git "${_res##git+}"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# arg1: post-source
|
# arg1: post-source
|
||||||
@ -434,7 +427,7 @@ pkg_source() {
|
|||||||
done < "$repo_dir/sources"
|
done < "$repo_dir/sources"
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_source_get() {
|
pkg_source_url() {
|
||||||
log "$repo_name" "Downloading $2"
|
log "$repo_name" "Downloading $2"
|
||||||
|
|
||||||
# Set the arguments based on found download utility.
|
# Set the arguments based on found download utility.
|
||||||
|
Loading…
Reference in New Issue
Block a user