diff --git a/config/path b/config/path index 90d1cab70e..338fa305fb 100644 --- a/config/path +++ b/config/path @@ -100,6 +100,8 @@ if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then fi if [[ ${PKG_URL} =~ .git$ || ${PKG_URL} =~ ^git:// ]]; then PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.gz + elif [[ ${PKG_URL} =~ ^file:// ]]; then + PKG_SOURCE_NAME=${PKG_URL#file://} else PKG_SOURCE_NAME="${PKG_URL##*/}" case $PKG_SOURCE_NAME in diff --git a/scripts/get b/scripts/get index 8c11720323..320f7c4068 100755 --- a/scripts/get +++ b/scripts/get @@ -49,6 +49,8 @@ if [ -n "$PKG_URL" -a -n "$PKG_SOURCE_NAME" ]; then case "${PKG_URL}" in git://*|*.git) get_handler="git";; + file://*) + get_handler="file";; *) get_handler="archive";; esac diff --git a/scripts/get_file b/scripts/get_file new file mode 100755 index 0000000000..bd5841cf65 --- /dev/null +++ b/scripts/get_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 . +################################################################################ + +printf "%${BUILD_INDENT}c $(print_color CLR_GET "GET") $1 (file)\n" ' '>&$SILENT_OUT +export BUILD_INDENT=$((${BUILD_INDENT:-1}+$BUILD_INDENT_SIZE))