Commit 18175347 authored by Federico Vaga's avatar Federico Vaga Committed by Alessandro Rubini

flash-wrs: fix help message

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>

Conflicts:

	build/flash-wrs
parent 4aa7876f
...@@ -22,12 +22,12 @@ showhelp() ...@@ -22,12 +22,12 @@ showhelp()
printf "<firmware>.tar.gz: Use the file in the firmware to flash the device\n" printf "<firmware>.tar.gz: Use the file in the firmware to flash the device\n"
printf "DEV:\t The usb device (by default it is /dev/ttyACM0)\n" printf "DEV:\t The usb device (by default it is /dev/ttyACM0)\n"
printf "Options: \n" printf "Options: \n"
printf "\t-h|--help\t\t Show this help message\n" printf " -h|--help\t Show this help message\n"
printf "\t-m|--mode\t\t can be: default, df (dataflash), nf (nandflash), test.\n" printf " -m|--mode\t can be: default, df (dataflash), nf (nandflash), test.\n"
printf "\t-e \t\t\t Completely erase the memory (Can erase your configuration)\n" printf " -e \t\t Completely erase the memory (Can erase your configuration)\n"
printf "\t--build\t\t\t Use file that you have build in the WRS_OUTPUT_DIR\n" printf " -b|--build\t Use file that you have build in the WRS_OUTPUT_DIR\n"
printf "\t--test\t\t\t Use file for testing the switch (not available)\n" printf " --test\t Use file for testing the switch (not available)\n"
printf "\t--skip\t\t Don't ask MAC or S/N and use default 02:0B:AD:C0:FF:EE\n\n" printf " --skip\t Don't ask MAC or S/N and use default 02:0B:AD:C0:FF:EE\n\n"
exit 0 exit 0
} }
...@@ -127,7 +127,13 @@ while [ $# -ge 1 ]; do ...@@ -127,7 +127,13 @@ while [ $# -ge 1 ]; do
fi fi
memmode="$2" memmode="$2"
shift; shift;; shift; shift;;
--skip) skip=1; shift;; --skip)
# set default the MAC address if user didn't set a MAC address
if [ "x$MAC" = "x" ]; then
MAC="02:0B:AD:C0:FF:EE"
fi
skip=1;
shift;;
/* ) DEV="-s $1"; shift ;; /* ) DEV="-s $1"; shift ;;
*:* ) MAC="$1"; shift ;; *:* ) MAC="$1"; shift ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment