mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
tools: unbranding changes for distro-tool
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
This commit is contained in:
parent
51b1613d9e
commit
c45a2ac118
@ -9,7 +9,7 @@ export NOONEXIT=yes
|
|||||||
|
|
||||||
[ -z "${DEBUG_LOG}" ] && DEBUG_LOG=/tmp/distro-tool.log
|
[ -z "${DEBUG_LOG}" ] && DEBUG_LOG=/tmp/distro-tool.log
|
||||||
|
|
||||||
LIBREELEC_DIR=$HOME/LibreELEC.tv
|
DISTRO_DIR=$HOME/LibreELEC.tv
|
||||||
TARGET_DIR=$HOME/sources
|
TARGET_DIR=$HOME/sources
|
||||||
DOWNLOAD_DIR=$HOME/download
|
DOWNLOAD_DIR=$HOME/download
|
||||||
REVISION=
|
REVISION=
|
||||||
@ -737,15 +737,15 @@ Options:
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
get_libreelec_branch() {
|
get_distro_branch() {
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
git rev-parse --abbrev-ref HEAD
|
git rev-parse --abbrev-ref HEAD
|
||||||
}
|
}
|
||||||
|
|
||||||
# 1: LibreELEC variable, eg. DISTRO_VERSION
|
# 1: LibreELEC variable, eg. DISTRO_VERSION
|
||||||
get_libreelec_option() {
|
get_distro_option() {
|
||||||
local variable="$1"
|
local variable="$1"
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
source config/options ""
|
source config/options ""
|
||||||
echo "${!variable}"
|
echo "${!variable}"
|
||||||
}
|
}
|
||||||
@ -827,7 +827,7 @@ generate_work_worker() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
|
|
||||||
source config/options ""
|
source config/options ""
|
||||||
|
|
||||||
@ -845,8 +845,8 @@ generate_work_worker() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_IS_ADDON=No
|
PKG_IS_ADDON=No
|
||||||
[[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/addons/.* ]] && PKG_IS_ADDON=Yes
|
[[ ${PKG_DIR/${DISTRO_DIR}/} =~ ^/packages/addons/.* ]] && PKG_IS_ADDON=Yes
|
||||||
[[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/mediacenter/kodi-binary-addons/.* ]] && PKG_IS_ADDON=Yes
|
[[ ${PKG_DIR/${DISTRO_DIR}/} =~ ^/packages/mediacenter/kodi-binary-addons/.* ]] && PKG_IS_ADDON=Yes
|
||||||
|
|
||||||
echo " {" >>${workfile_o}
|
echo " {" >>${workfile_o}
|
||||||
for var in ${wanted_vars}; do
|
for var in ${wanted_vars}; do
|
||||||
@ -883,7 +883,7 @@ get_packages() {
|
|||||||
local anchor="@?+?@"
|
local anchor="@?+?@"
|
||||||
|
|
||||||
(
|
(
|
||||||
cd $LIBREELEC_DIR
|
cd $DISTRO_DIR
|
||||||
|
|
||||||
# Generate package caches...
|
# Generate package caches...
|
||||||
source config/options ""
|
source config/options ""
|
||||||
@ -945,7 +945,7 @@ while [ : ]; do
|
|||||||
;;
|
;;
|
||||||
-l | --libreelec)
|
-l | --libreelec)
|
||||||
shift
|
shift
|
||||||
LIBREELEC_DIR=$1
|
DISTRO_DIR=$1
|
||||||
;;
|
;;
|
||||||
-t | --target)
|
-t | --target)
|
||||||
shift
|
shift
|
||||||
@ -1031,23 +1031,23 @@ done
|
|||||||
|
|
||||||
if [ ${DOGIT} = yes ]; then
|
if [ ${DOGIT} = yes ]; then
|
||||||
(
|
(
|
||||||
if [ -d ${LIBREELEC_DIR}/.git ]; then
|
if [ -d ${DISTRO_DIR}/.git ]; then
|
||||||
cd ${LIBREELEC_DIR}
|
cd ${DISTRO_DIR}
|
||||||
git pull
|
git pull
|
||||||
else
|
else
|
||||||
mkdir -p $(dirname "${LIBREELEC_DIR}") 2>/dev/null
|
mkdir -p $(dirname "${DISTRO_DIR}") 2>/dev/null
|
||||||
cd $(dirname "${LIBREELEC_DIR}")
|
cd $(dirname "${DISTRO_DIR}")
|
||||||
git clone https://github.com/LibreELEC/LibreELEC.tv.git $(basename "${LIBREELEC_DIR}")
|
git clone https://github.com/LibreELEC/LibreELEC.tv.git $(basename "${DISTRO_DIR}")
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_exists LIBREELEC_DIR || exit
|
check_exists DISTRO_DIR || exit
|
||||||
LIBREELEC_DIR="$(get_abs_path "${LIBREELEC_DIR}")"
|
DISTRO_DIR="$(get_abs_path "${DISTRO_DIR}")"
|
||||||
|
|
||||||
DISTRO_SOURCE="$(get_libreelec_option DISTRO_SRC)"
|
DISTRO_SOURCE="$(get_distro_option DISTRO_SRC)"
|
||||||
DISTRO_MIRROR="$(get_libreelec_option DISTRO_MIRROR)"
|
DISTRO_MIRROR="$(get_distro_option DISTRO_MIRROR)"
|
||||||
DISTRO_VER="$(get_libreelec_option DISTRO_VERSION)"
|
DISTRO_VER="$(get_distro_option DISTRO_VERSION)"
|
||||||
|
|
||||||
if [ ${IS_MIRROR} = no ]; then
|
if [ ${IS_MIRROR} = no ]; then
|
||||||
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/${DISTRO_VER}")"
|
TARGET_DIR="$(get_abs_path "${TARGET_DIR}/${DISTRO_VER}")"
|
||||||
@ -1070,9 +1070,9 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
if [ ${IS_MIRROR} = yes ]; then
|
if [ ${IS_MIRROR} = yes ]; then
|
||||||
echo "Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${DISTRO_VER}) with MIRROR server ${TARGET_DIR}"
|
echo "Synchronising (branch: $(get_distro_branch), version: ${DISTRO_VER}) with MIRROR server ${TARGET_DIR}"
|
||||||
else
|
else
|
||||||
echo "Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${DISTRO_VER}) with SOURCE server ${TARGET_DIR}"
|
echo "Synchronising (branch: $(get_distro_branch), version: ${DISTRO_VER}) with SOURCE server ${TARGET_DIR}"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "Distro Source is: ${DISTRO_SOURCE}"
|
echo "Distro Source is: ${DISTRO_SOURCE}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user