From d3ec68dc87b7674240476febd1b0d060a72f98e4 Mon Sep 17 00:00:00 2001 From: Ribbon Date: Wed, 17 Jan 2024 03:02:31 +0000 Subject: [PATCH] Add a script to show the branches and commit hashes of some recipe source --- scripts/commit-hash.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/commit-hash.sh diff --git a/scripts/commit-hash.sh b/scripts/commit-hash.sh new file mode 100755 index 0000000..a06e106 --- /dev/null +++ b/scripts/commit-hash.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +if [ $# -ne 1 ] +then + echo "Usage: $0 recipe_name" + echo " Print the commit hash for recipe_name" + exit 1 +fi + +cd cookbook +recipe_path="$(target/release/find_recipe $1)" + +cd "$recipe_path"/source +git branch -v