From 389111a187b7b88819d5984b02dab76360f2b356 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 7 Aug 2022 13:34:52 +0100 Subject: fixed not extracting --- xibuild.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'xibuild.sh') diff --git a/xibuild.sh b/xibuild.sh index 134a85a..312068d 100644 --- a/xibuild.sh +++ b/xibuild.sh @@ -2,6 +2,8 @@ XIPKG_INFO_VERSION='05' +#include colors.sh +#include glyphs.sh [ -f /usr/lib/colors.sh ] && . /usr/lib/colors.sh [ -f /usr/lib/glyphs.sh ] && . /usr/lib/glyphs.sh @@ -92,16 +94,18 @@ xibuild_prepare () { # fetch_source [source_url] (branch) # fetch_source () { - git ls-remote -q $@ >/dev/null 2>&1 && { + case "$1" in + *".git") git clone $1 . git checkout $2 - } 2>&1 || { + ;; + *) local downloaded=$(basename $1) curl -SsL $1 > $downloaded extract $downloaded - - } + ;; + esac } xibuild_fetch () { @@ -193,8 +197,10 @@ xibuild_describe () { . $buildfile local pkg_ver=$PKG_VER - [ -z "$pkg_ver" ] && pkg_ver=$BRANCH - [ -z "$pkg_ver" ] && pkg_ver="latest" + [ -z "$pkg_ver" ] && + pkg_ver=$BRANCH + [ -z "$pkg_ver" ] && + pkg_ver="latest" deps="$(echo ${DEPS} | tr ' ' '\n' | cat - $out_dir/$name.deps | sort | uniq | xargs printf "%s ")" rm $out_dir/$name.deps -- cgit v1.2.1