mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
scripts/get_file: add file:// support - exists only for logging
This commit is contained in:
parent
afcecf7b0d
commit
d246e986d2
@ -100,6 +100,8 @@ if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then
|
|||||||
fi
|
fi
|
||||||
if [[ ${PKG_URL} =~ .git$ || ${PKG_URL} =~ ^git:// ]]; then
|
if [[ ${PKG_URL} =~ .git$ || ${PKG_URL} =~ ^git:// ]]; then
|
||||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.gz
|
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.gz
|
||||||
|
elif [[ ${PKG_URL} =~ ^file:// ]]; then
|
||||||
|
PKG_SOURCE_NAME=${PKG_URL#file://}
|
||||||
else
|
else
|
||||||
PKG_SOURCE_NAME="${PKG_URL##*/}"
|
PKG_SOURCE_NAME="${PKG_URL##*/}"
|
||||||
case $PKG_SOURCE_NAME in
|
case $PKG_SOURCE_NAME in
|
||||||
|
@ -49,6 +49,8 @@ if [ -n "$PKG_URL" -a -n "$PKG_SOURCE_NAME" ]; then
|
|||||||
case "${PKG_URL}" in
|
case "${PKG_URL}" in
|
||||||
git://*|*.git)
|
git://*|*.git)
|
||||||
get_handler="git";;
|
get_handler="git";;
|
||||||
|
file://*)
|
||||||
|
get_handler="file";;
|
||||||
*)
|
*)
|
||||||
get_handler="archive";;
|
get_handler="archive";;
|
||||||
esac
|
esac
|
||||||
|
20
scripts/get_file
Executable file
20
scripts/get_file
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2018-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
printf "%${BUILD_INDENT}c $(print_color CLR_GET "GET") $1 (file)\n" ' '>&$SILENT_OUT
|
||||||
|
export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))
|
Loading…
x
Reference in New Issue
Block a user