From 554c13dc2c7939ac64f092b44928b55630893383 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 1 Feb 2023 12:33:52 -0600 Subject: [PATCH] util/chromeos/extract_blobs: allow passing dest dir as arg Allow user to pass the output dir for the extracted blobs as the 2nd argument to the script; if not provided, fall back to the existing default. Change-Id: I0f120b69e0b6d14c2763b9a3b2a622e77c4fe0d4 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/72910 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- util/chromeos/extract_blobs.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util/chromeos/extract_blobs.sh b/util/chromeos/extract_blobs.sh index 669327d3fe..ca0bdeeee6 100755 --- a/util/chromeos/extract_blobs.sh +++ b/util/chromeos/extract_blobs.sh @@ -8,9 +8,14 @@ if [ ! -f "$1" ]; then fi IMAGE=$1 -# create new dir '$IMAGE-blobs' (less file extension) -DIR=$(basename $IMAGE) -DIR="${DIR%.*}-blobs" + +if [[ "$2" = "" ]]; then + # create new dir '$IMAGE-blobs' (less file extension) + DIR=$(basename $IMAGE) + DIR="${DIR%.*}-blobs" +else + DIR=$2 +fi mkdir -p $DIR if [ -f ./cbfstool ]; then