Check number of arguments when installing to microsd
This commit is contained in:
parent
f99b293962
commit
1364ea3298
|
@ -20,6 +20,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# The number of arguments
|
||||
NO_OF_ARGS=$#
|
||||
|
||||
# Version number of this script
|
||||
VERSION="1.00"
|
||||
|
||||
|
@ -45,8 +48,16 @@ function show_help {
|
|||
echo ''
|
||||
echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address]'
|
||||
echo ''
|
||||
echo 'See the manpage for more details'
|
||||
echo ''
|
||||
}
|
||||
|
||||
# if no arguments are given
|
||||
if [[ $NO_OF_ARGS == 0 ]]; then
|
||||
show_help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while [[ $# > 1 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
|
Loading…
Reference in New Issue