33007f505b
Change-Id: If028aca042dbba653cc0f51a0149b36bed5c7853 Signed-off-by: Ed Warnicke <eaw@cisco.com>
31 lines
605 B
Bash
Executable File
31 lines
605 B
Bash
Executable File
#!/bin/bash
|
|
PREFIX_ARGS=""
|
|
CMD_ARGS=""
|
|
while [[ $# -gt 0 ]]; do
|
|
arg=$1
|
|
shift
|
|
case ${arg} in
|
|
--prefix|-p)
|
|
PREFIX_ARGS="chroot prefix ${1}"
|
|
shift
|
|
;;
|
|
*)
|
|
CMD_ARGS="$CMD_ARGS ${arg}"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ "x${CMD_ARGS}" != "x" ]; then
|
|
echo exec ${CMD_ARGS} | vpp_api_test $PREFIX_ARGS | sed 's/vat# //g'
|
|
else
|
|
echo -n "vpp# "
|
|
while read CMD; do
|
|
if [ "x$CMD" == "xexit" ]; then
|
|
exit
|
|
elif [ "x$CMD" != "x" ]; then
|
|
echo exec $CMD | vpp_api_test $PREFIX_ARGS| sed 's/vat# //g'
|
|
fi
|
|
echo -n "vpp# "
|
|
done
|
|
fi
|