Skip to content

Instantly share code, notes, and snippets.

@machta
machta / update-srcrevs.sh
Last active October 6, 2019 11:40
Recursively searches for bitbake recipes and updates SRCREVs to the tops of selected branches.
#!/bin/bash
#
# Recursively searches for bitbake recipes and updates SRCREVs to the tops of
# selected branches.
if [ $# -ne 1 ] ; then
echo "Usage: ./update-srcrev.sh ROOT_SEARCH_DIR"
exit 1
fi
@machta
machta / git-check-versions.sh
Created January 19, 2019 13:55
Checks that this repository and all of its submodules point to the tip of a certain BRANCH
#!/bin/bash
#
# Usage ./git-check-versions.sh BRANCH
#
# Checks that this repository and all of its submodules point to the tip of
# a certain BRANCH.
BRANCH=$1
check() {
@machta
machta / git-compare.sh
Last active January 19, 2019 10:00
Compares all commits in a git repo against a directory, and outputs the commit message prefixed by the line count of the diff between the two
#!/bin/bash
#
# Usage: ./git-compare.sh PATH_TO_REPO DIR_TO_COMPARE_AGAINST
#
# Compares all commits in a git repo against a directory, and outputs the commit
# message prefixed by the line count of the diff between the two.
#
# If somobody copies the content of your repository (i.e. downloads a tarball
# instead of cloning it) and possibly does some changes, you can later use this
# to figure out on which commit it was based on.