From 1fe0021226a26ba4b5bb64f1a6e7c124a790f7ac Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Wed, 5 Mar 2014 11:01:38 -0600 Subject: [PATCH] generic: learn something new, conditional assignments Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- generic_image.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/generic_image.sh b/generic_image.sh index 75fb55c50..9fc91d528 100755 --- a/generic_image.sh +++ b/generic_image.sh @@ -120,18 +120,10 @@ if [ ! "${export_filename}" ] ; then ##Generic file name export_filename="${distro}-${release}-${image_name}-${dpkg_arch}-${time}" fi -if [ ! "${image_hostname}" ] ; then - image_hostname="arm" -fi -if [ ! "${user_name}" ] ; then - user_name="${distro}" -fi -if [ ! "${password}" ] ; then - password="temppwd" -fi -if [ ! "${full_name}" ] ; then - full_name="Demo User" -fi +image_hostname=${image_hostname:-"arm"} +user_name=${user_name:-"${distro}"} +password=${password:-"temppwd"} +full_name=${full_name:-"Demo User"} run_rootstock -- GitLab