check exit status of all commands

This commit is contained in:
George Danchev 2011-07-12 11:01:39 +00:00
parent 364361e228
commit cbc1a9723a
1 changed files with 20 additions and 9 deletions

View File

@ -20,6 +20,16 @@ fi
get_speeds() { get_speeds() {
echo -e "\n${SELF}: Running: ${RELENG_XORRISO} -outdev ${1} -list_speeds" echo -e "\n${SELF}: Running: ${RELENG_XORRISO} -outdev ${1} -list_speeds"
${RELENG_XORRISO} -outdev ${1} -list_speeds ${RELENG_XORRISO} -outdev ${1} -list_speeds
RET_SPEEDS="$?"
case ${RET_SPEEDS} in
0)
;;
*)
boldify
echo -e "\n${SELF}: ${RELENG_XORRISO} -outdev ${1} -list_speeds returned ${RET_SPEEDS}."
unboldify
;;
esac
} }
get_devices() { get_devices() {
@ -47,17 +57,18 @@ get_devices() {
# main # main
echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices..." echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices..."
$RELENG_XORRISO -devices $RELENG_XORRISO -devices
RET="$?" RET_DEVICES="$?"
case ${RET} in case ${RET_DEVICES} in
0) 0)
get_devices get_devices
;; ;;
*) *)
boldify boldify
echo -ne "\n${SELF}: ${RELENG_XORRISO} -devices returned ${RET}." echo -ne "\n${SELF}: ${RELENG_XORRISO} -devices returned ${RET_DEVICES}."
unboldify unboldify
echo -e "\n${SELF}: Already mounted?" echo -e "\n${SELF}: Already mounted?"
df -kh df -kh
;;
esac esac
exit 0 exit 0