Skip to content
Permalink
Browse files

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>
  • Loading branch information
HiassofT committed Dec 29, 2019
1 parent 49ebd0f commit f9f53151b5277f699e957bccfdc6954d78c59b62
Showing with 10 additions and 4 deletions.
  1. +10 −4 tools/mkpkg/update_binary-addons
@@ -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

0 comments on commit f9f5315

Please sign in to comment.
You can’t perform that action at this time.