From 0c6af4b3bea649e2a4f02d555f9c156237942133 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 6 Jul 2017 16:15:14 +0100 Subject: [PATCH] Add a helper script for bulk updating component sha's Signed-off-by: Ian Campbell --- scripts/update-component-sha.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/update-component-sha.sh diff --git a/scripts/update-component-sha.sh b/scripts/update-component-sha.sh new file mode 100755 index 000000000..63fb811a5 --- /dev/null +++ b/scripts/update-component-sha.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +if [ $# -ne 2 ] ; then + echo "Need and as arguments" >&2 + exit 1 +fi +old=$1 +new=$2 + +git grep -l "$old" | xargs sed -i -e "s,$old,$new,g"