#these functions will be sourced from the config file
#they are generic functions for dealing with input parameters and usage text
dump_options ()
{ echo "Dumping all options : "
  for I in ${!MyOptions[@]}
  do
    echo "${I}=${MyOptions[$I]##*,}"
  done
}

usage ()
{ cat <<EOF 

usage: $Name [OPTIONS] 

Slackware miniroot image creator

OPTIONS
EOF
  for I in ${!MyOptions[@]}
  do
    PARM=${MyOptions[$I]%%,*}
    HTXT=$(echo "${MyOptions[$I]}" |cut -d "," -f 2)
    [ "$PARM" = ":" ] && echo -e "-$I <value> $HTXT" || echo -e "-$I $HTXT"
  done

  echo -e "\nSupported targer releases:"
  for Rel in ${!SupportedReleases[*]}
  do
    echo "$Rel"
  done
  
  echo
  if [ "$*" != "" ] 
  then
    echo "Error: $*"
    exit 1
  else
    exit 0
  fi
}

get_myoptions_value ()
{ echo "${MyOptions[$1]##*,}"
}

set_myoptions_value ()
{ MyOptions[$1]="${MyOptions[$1]%,*},$2"
  export MyOptions
}

