#!/bin/bash # compares given digi manifest with the leahi version err_no_commit=1 err_nomanifest=2 # one commit before kirkstore. # Digi has a habit of adding all the hashes then on next commit changes all to kirkstone and tag it. # But it seems that last kirkstone tag is not always working. commit="kirkstone~1" mainfolder="$(dirname "$0")" manifest="default.xml" repository="dey-manifest" repository_qt5="meta-qt5" if [[ "$commit" == "" ]]; then echo "WARN: empty branch/tag/commit-hash" echo "WARN: the branch $commit (one behind) will be used" exit $err_no_commit fi # change directory where the script is cd $mainfolder if [[ ! -f $manifest ]]; then echo "the default manifest does not exists" exit $no_manifest fi # cleanup the cloned folder for digi manifest rm -rf $repository git clone "https://github.com/digi-embedded/$repository.git" cd $repository git checkout -q "$commit" echo " ----- digi manifest is on ----- " git branch | grep "\*" cd - > /dev/null # cleanup the cloned folder for qt5 layer to manually get compared. rm -rf "$repository_qt5" git clone "https://code.qt.io/yocto/$repository_qt5.git" cd $repository_qt5 echo " ----- meta-qt5 layer is on ----- " git branch | grep "\*" git log -1 --format=%H cd - > /dev/null # add default and leahi remotes. digimanifest=$repository/$manifest digimanifestmod=' ' # remove the repositories we do not need sed -i '/qt6/d' $digimanifest sed -i '/virtualization/d' $digimanifest sed -i '/selinux/d' $digimanifest sed -i '/stm/d' $digimanifest # add remote - digi digimanifestmod+="$(sed -n '/ "$digimanifest" # compare the two leahi and digi manifests. # diff -u $manifest $digimanifest | cat meld '$manifest' '$digimanifest' &