mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
update_binary-addons: allow specifying branch for unofficial addons
Since Kodi Matrix hasn't branched yet and is still developed in master the kodi branch name (master) and the branch name used in addons (Matrix) doesn't match. Allow to optionally specify the addon branch name on the command line, eg "./update_binary-addons master Matrix". This fixes visualization.pictureit bumps for master which picked up the master branch of the addon instead of the Matrix branch. Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
6f7e62d67a
commit
80e2910726
@ -8,7 +8,7 @@ BUMP_PKG_REV=""
|
||||
KEEP_GIT_DIRS="yes"
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [options] <branch-name>"
|
||||
echo "Usage: $0 [options] <kodi-branch> [<unofficial-addon-branch>]"
|
||||
echo " -b, --bump-pkg-rev: bump PKG_REV if package was not updated"
|
||||
echo " -d, --delete-git-dirs: delete cloned git dirs after update"
|
||||
echo " -h, --help: display help and exit"
|
||||
@ -40,7 +40,7 @@ while [ $# -ne 0 ]; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
if [ $# -eq 0 -o $# -gt 2 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
@ -60,6 +60,12 @@ mkdir -p "${TMPDIR}"
|
||||
KODI_BRANCH="$1"
|
||||
KODI_DIR="kodi.git"
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
UNOFFICIAL_ADDON_BRANCH="${KODI_BRANCH}"
|
||||
else
|
||||
UNOFFICIAL_ADDON_BRANCH="$2"
|
||||
fi
|
||||
|
||||
. "${MY_DIR}/update_common_functions"
|
||||
|
||||
git_clone https://github.com/xbmc/xbmc ${KODI_DIR} ${KODI_BRANCH}
|
||||
@ -165,8 +171,8 @@ for ADDON in $(ls -1 "${ROOT}/packages/mediacenter/kodi-binary-addons"); do
|
||||
|
||||
git_clone ${GIT_REPO} ${GIT_DIR}
|
||||
|
||||
if RESOLVED_HASH=$(resolve_hash_in_branch ${ADDON}.git ${KODI_BRANCH}); then
|
||||
echo "Resolved hash for ${ADDON}: ${KODI_BRANCH} => ${RESOLVED_HASH}"
|
||||
if RESOLVED_HASH=$(resolve_hash_in_branch ${ADDON}.git ${UNOFFICIAL_ADDON_BRANCH}); then
|
||||
echo "Resolved hash for ${ADDON}: ${UNOFFICIAL_ADDON_BRANCH} => ${RESOLVED_HASH}"
|
||||
elif RESOLVED_HASH=$(resolve_hash_in_branch ${ADDON}.git HEAD); then
|
||||
echo "Resolved hash for ${ADDON}: HEAD => ${RESOLVED_HASH}"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user