diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2011-09-25 22:54:04 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-09-26 13:22:24 +0200 |
commit | 4ac5def38adb65e392f0b7b3965c6763e8ae3fa4 (patch) | |
tree | d4a5e6cb712698cade486bb792995878dc5a1910 /defaultenv/bin/update | |
parent | 5cd360c2952e9164e415a1058676367cd4f109a5 (diff) | |
download | barebox-4ac5def38adb65e392f0b7b3965c6763e8ae3fa4.tar.gz barebox-4ac5def38adb65e392f0b7b3965c6763e8ae3fa4.tar.xz |
defaultenv: simplify scripting
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv/bin/update')
-rw-r--r-- | defaultenv/bin/update | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/defaultenv/bin/update b/defaultenv/bin/update index 55ac10b95d..6fd5e4ca26 100644 --- a/defaultenv/bin/update +++ b/defaultenv/bin/update @@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then type=root elif [ x${type} = xbarebox ]; then image=$bareboximage - if [ x${image} = x ]; then + if [ -z ${image} ]; then image=barebox.bin fi elif [ x${type} = xbareboxenv ]; then image=$bareboxenvimage - if [ x${image} = x ]; then + if [ -z ${image} ]; then image=bareboxenv.bin fi elif [ x${type} = xxload ]; then @@ -47,7 +47,7 @@ else exit 1 fi -if [ x${imagename} != x ]; then +if [ -n ${imagename} ]; then image=${imagename} fi @@ -60,7 +60,7 @@ else exit 1 fi -if [ x${mode} != xtftp ] && [ x${mode} != xxmodem ] ; then +if [ x${mode} != xtftp -a x${mode} != xxmodem ] ; then echo "unsupported mode ${mode}." . /env/bin/_update_help exit 1 |