#!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later source ./common.sh REPO=${1} BRANCH=${2} ORIGIN=https://git.libcamera.org/libcamera/libcamera.git LIBCAMERA=${3:-$(srcdir libcamera)} if [ ! -d $LIBCAMERA ] ; then git clone $ORIGIN $LIBCAMERA fi git -C $LIBCAMERA fetch origin --prune pass_fail $? "Update from origin" git -C $LIBCAMERA branch -D integration_tests git -C $LIBCAMERA checkout -b integration_tests git -C $LIBCAMERA fetch $REPO $BRANCH pass_fail $? "Fetch $BRANCH from $REPO" git -C $LIBCAMERA reset --hard FETCH_HEAD pass_fail $? "Set tree to fetch branch" git -C $LIBCAMERA rebase origin/master pass_fail $? "Rebase to master.." git -C $LIBCAMERA log --oneline HEAD...origin/master echo "libcamera at version : " $(libcamera_version "$LIBCAMERA")