* allow writing minicom runscript commands to multiple files
Signed-off-by: Jacob Stiffler <[email protected]>
---
setup-uboot-env-keystone.sh | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
index fdd131a..356e9c7 100755
--- a/setup-uboot-env-keystone.sh
+++ b/setup-uboot-env-keystone.sh
@@ -34,16 +34,26 @@ cwd=`dirname $0`
. $cwd/common.sh
do_expect() {
- echo "expect {" >> $3
- check_status
- echo " $1" >> $3
- check_status
- echo " timeout 600 goto end" >> $3
- echo "}" >> $3
- check_status
- echo $2 >> $3
- check_status
- echo >> $3
+ local expect_str="$1"
+ local command="$2"
+
+ shift; shift
+
+ while [ $# -gt 0 ]
+ do
+ echo "expect {" >> "$1"
+ check_status
+ echo " $expect_str" >> "$1"
+ check_status
+ echo " timeout 600 goto end" >> "$1"
+ echo "}" >> "$1"
+ check_status
+ echo $command >> "$1"
+ check_status
+ echo >> "$1"
+
+ shift
+ done
}
prompt_feedback() {
--
1.9.1
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago