-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add for_each_firmware script to run wrapper script through all firmwa…
…re IDs
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if test $# -ne 1; then | ||
echo "Usage: $0 <wrapper-script>" 1>&2 | ||
echo "" 1>&2 | ||
echo "Argument is wrapper script to run fo each firmware (e.g. all_sandblaster)" 1>&2 | ||
echo "" | ||
echo "Firmware IDs are provided to standard input. You can provide all " 1>&2 | ||
echo "firmware IDs from the firmware-metadata/ folder by running:" 1>&2 | ||
echo " ls firmware-metadata/ | grep '^iP' | ./for_each_firmware all_sandblaster" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
wrapper_script="$1" | ||
if ! test -f "$wrapper_script"; then | ||
echo "No such file $wrapper_script" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
while read firmware_id; do | ||
echo "== Running $wrapper_script for firmware ID $firmware_id" | ||
bash "$wrapper_script" "$firmware_id" | ||
done |