more meaningful output
This commit is contained in:
parent
594b4a0ce3
commit
19daaa2b77
@ -23,21 +23,22 @@ get_speeds() {
|
||||
}
|
||||
|
||||
get_devices() {
|
||||
echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices 2>/dev/null | grep \"\-dev\""
|
||||
DEVICES=`$RELENG_XORRISO -devices 2>/dev/null | grep "\-dev"`
|
||||
NUM_DEV=`echo ${DEVICES} | wc -l`
|
||||
|
||||
case "${NUM_DEV}" in
|
||||
0)
|
||||
echo -e "\n${SELF}: No drives found."
|
||||
echo -e "${SELF}: No drives found."
|
||||
exit 1
|
||||
;;
|
||||
1)
|
||||
echo -e "\n${SELF}: Single drive found:\n${DEVICES}"
|
||||
echo -e "${SELF}: Single drive found:\n${DEVICES}"
|
||||
OUTDEV=`${RELENG_XORRISO} -devices 2>/dev/null | perl -pe "s#^\d+\s+\-dev\s+\'## and s#\'.*##"`
|
||||
get_speeds ${OUTDEV}
|
||||
;;
|
||||
*)
|
||||
echo -e "\n${SELF}: Multiple drives found. NOT FINISHED YET."
|
||||
echo -e "${SELF}: Multiple drives found. NOT FINISHED YET."
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user