mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
Merge pull request #2321 from MilhouseVH/le90_distro_tools_projects
distro-tool: add project package support
This commit is contained in:
commit
712af9d848
@ -726,7 +726,7 @@ get_libreelec_branch() {
|
|||||||
get_libreelec_option() {
|
get_libreelec_option() {
|
||||||
local variable="$1"
|
local variable="$1"
|
||||||
cd $LIBREELEC_DIR
|
cd $LIBREELEC_DIR
|
||||||
. config/options
|
source config/options ""
|
||||||
echo "${!variable}"
|
echo "${!variable}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -759,6 +759,10 @@ generate_work() {
|
|||||||
# Generate workload using multiple threads
|
# Generate workload using multiple threads
|
||||||
init_progress
|
init_progress
|
||||||
|
|
||||||
|
(
|
||||||
|
cd $LIBREELEC_DIR
|
||||||
|
source config/options ""
|
||||||
|
|
||||||
tcount=0
|
tcount=0
|
||||||
while [ : ]; do
|
while [ : ]; do
|
||||||
tcount=$((tcount + 1))
|
tcount=$((tcount + 1))
|
||||||
@ -766,6 +770,7 @@ generate_work() {
|
|||||||
generate_work_worker ${pcount} ${tcount} ${revision} &
|
generate_work_worker ${pcount} ${tcount} ${revision} &
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
|
)
|
||||||
|
|
||||||
end_progress
|
end_progress
|
||||||
|
|
||||||
@ -792,7 +797,7 @@ generate_work_worker() {
|
|||||||
local pcount=$1 worker="$2" revision="$3"
|
local pcount=$1 worker="$2" revision="$3"
|
||||||
local workfile_i="$(printf "%s.%02d" "${WORKFILES_I}" ${worker})"
|
local workfile_i="$(printf "%s.%02d" "${WORKFILES_I}" ${worker})"
|
||||||
local workfile_o="$(printf "%s.%02d" "${WORKFILES_O}" ${worker})"
|
local workfile_o="$(printf "%s.%02d" "${WORKFILES_O}" ${worker})"
|
||||||
local wanted_vars="PKG_NAME PKG_VERSION PKG_URL PKG_SHA256 PKG_SECTION PKG_IS_ADDON PKG_SOURCE_NAME"
|
local wanted_vars="PKG_NAME PKG_VERSION PKG_URL PKG_SHA256 PKG_DIR PKG_SECTION PKG_IS_ADDON PKG_SOURCE_NAME"
|
||||||
local package_name var comma PKG_URL PKG_SOURCE_NAME PKG_VERSION PKG_IS_ADDON
|
local package_name var comma PKG_URL PKG_SOURCE_NAME PKG_VERSION PKG_IS_ADDON
|
||||||
|
|
||||||
[ -f "${workfile_i}" ] || return 0
|
[ -f "${workfile_i}" ] || return 0
|
||||||
@ -809,6 +814,7 @@ generate_work_worker() {
|
|||||||
[ ${PROGRESS} == yes ] && progress ${pcount}
|
[ ${PROGRESS} == yes ] && progress ${pcount}
|
||||||
|
|
||||||
source config/options ${package_name} &>/dev/null || true
|
source config/options ${package_name} &>/dev/null || true
|
||||||
|
[ -z "${PKG_DIR}" ] && continue
|
||||||
|
|
||||||
if [ -n "${revision}" ]; then
|
if [ -n "${revision}" ]; then
|
||||||
PKG_URL="${PKG_URL/${PKG_VERSION}/${revision}}"
|
PKG_URL="${PKG_URL/${PKG_VERSION}/${revision}}"
|
||||||
@ -859,9 +865,9 @@ get_packages() {
|
|||||||
cd $LIBREELEC_DIR
|
cd $LIBREELEC_DIR
|
||||||
|
|
||||||
if [ -n "${package_name}" ]; then
|
if [ -n "${package_name}" ]; then
|
||||||
basename $(dirname $(find packages -path "*/${package_name}/*" -name package.mk) 2>/dev/null) 2>/dev/null
|
basename $(dirname $(find packages projects/${PROJECT} -path "*/${package_name}/*" -name package.mk) 2>/dev/null | head -1) 2>/dev/null
|
||||||
else
|
else
|
||||||
find packages -name package.mk -exec bash -c get_package_path "{}" \; | sort -k1 | cut -d' ' -f1
|
find packages projects/${PROJECT} -name package.mk -exec bash -c get_package_path "{}" \; | cut -d' ' -f1 | sort -u
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user