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 <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72910
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Matt DeVillier 2023-02-01 12:33:52 -06:00 committed by Felix Held
parent 4bf6f49d12
commit 554c13dc2c
1 changed files with 8 additions and 3 deletions

View File

@ -8,9 +8,14 @@ if [ ! -f "$1" ]; then
fi
IMAGE=$1
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